Loading ...
Sorry, an error occurred while loading the content.

43093Re: datatable error handling

Expand Messages
  • jennykhan
    Dec 31, 2008
    • 0 Attachment
      Hi Apoorva,

      You should explore defining custom CSS to change the width of the
      message area:

      // Recommended
      .yui-skin-sam .yui-dt-empty {width:40em;}

      // Pixel-defined widths are not a best practice
      .yui-skin-sam .yui-dt-empty {width:150px;}

      // May not be supported in all cases, please test for your
      .yui-skin-sam .yui-dt table {width:60em;}
      .yui-skin-sam .yui-dt-empty {width:100%;}

      Hope that helps,

      --- In ydn-javascript@yahoogroups.com, "Apoorva Singh"
      <apoorva.singh@...> wrote:
      > posting this again, apparently the experts missed this:
      > sometimes the json that comes back (e.g. an empty list)
      > leads to a data error in the table.
      > the problem is this "data error" message screws up the table
      width. so
      > the table is reduced to the width of "data error" message string
      > its ugly like hell.
      > is there a way to customize the "Data Error" message and maintain
      > width of the table when an error happens??
      > I tried changing the failureHandler of the callback but looks like
      > for something else, heres what i tried:
      > var myFailureHandler = function() {
      > this.showTableMessage("<div style="width:300">Nothing
      > found!</div>", YAHOO.widget.DataTable.CLASS_ERROR);
      > ...
      > appreciate assistance..
    • Show all 5 messages in this topic