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

Re: datatable error handling

Expand Messages
  • jennykhan
    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;} //
    Message 1 of 5 , 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
      implementation
      .yui-skin-sam .yui-dt table {width:60em;}
      .yui-skin-sam .yui-dt-empty {width:100%;}

      Hope that helps,
      Jenny



      --- 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
      and
      > its ugly like hell.
      >
      > is there a way to customize the "Data Error" message and maintain
      the
      > width of the table when an error happens??
      >
      > I tried changing the failureHandler of the callback but looks like
      its
      > 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..
      >
    • Apoorva Singh
      thanks a lot Jenny, that did help. an clues about customizing the data error message?
      Message 2 of 5 , Jan 2, 2009
      • 0 Attachment
        thanks a lot Jenny, that did help. an clues about customizing the
        'data error' message?

        --- In ydn-javascript@yahoogroups.com, "jennykhan" <jennyhan@...> wrote:
        >
        > 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
        > implementation
        > .yui-skin-sam .yui-dt table {width:60em;}
        > .yui-skin-sam .yui-dt-empty {width:100%;}
        >
        > Hope that helps,
        > Jenny
        >
        >
        >
        > --- 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
        > and
        > > its ugly like hell.
        > >
        > > is there a way to customize the "Data Error" message and maintain
        > the
        > > width of the table when an error happens??
        > >
        > > I tried changing the failureHandler of the callback but looks like
        > its
        > > 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..
        > >
        >
      • Satyam
        http://developer.yahoo.com/yui/docs/YAHOO.widget.DataTable.html#config_MSG_ERROR
        Message 3 of 5 , Jan 2, 2009
        • 0 Attachment
          http://developer.yahoo.com/yui/docs/YAHOO.widget.DataTable.html#config_MSG_ERROR

          Apoorva Singh wrote:
          > thanks a lot Jenny, that did help. an clues about customizing the
          > 'data error' message?
          >
          > --- In ydn-javascript@yahoogroups.com, "jennykhan" <jennyhan@...> wrote:
          >
          >> 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
          >> implementation
          >> .yui-skin-sam .yui-dt table {width:60em;}
          >> .yui-skin-sam .yui-dt-empty {width:100%;}
          >>
          >> Hope that helps,
          >> Jenny
          >>
          >>
          >>
          >> --- 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
          >>>
          >> and
          >>
          >>> its ugly like hell.
          >>>
          >>> is there a way to customize the "Data Error" message and maintain
          >>>
          >> the
          >>
          >>> width of the table when an error happens??
          >>>
          >>> I tried changing the failureHandler of the callback but looks like
          >>>
          >> its
          >>
          >>> 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..
          >>>
          >>>
          >
          >
          >
          > ------------------------------------
          >
          > Yahoo! Groups Links
          >
          >
          >
          > ------------------------------------------------------------------------
          >
          >
          > No virus found in this incoming message.
          > Checked by AVG - http://www.avg.com
          > Version: 8.0.176 / Virus Database: 270.10.2/1871 - Release Date: 01/01/2009 17:01
          >
          >
        • Apoorva Singh
          Satyam, you are the savior... i did try removing MSG_ERROR from the failure handler, for some weird reason i dint try changing...stupid of me! thanks again..
          Message 4 of 5 , Jan 2, 2009
          • 0 Attachment
            Satyam, you are the savior...
            i did try removing MSG_ERROR from the failure handler, for some weird
            reason i dint try changing...stupid of me! thanks again..

            --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
            >
            >
            http://developer.yahoo.com/yui/docs/YAHOO.widget.DataTable.html#config_MSG_ERROR
          Your message has been successfully submitted and would be delivered to recipients shortly.