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

Re: [ydn-javascript] Customizing the First Row

Expand Messages
  • Satyam
    It might be easier if you listen to initEvent and use addRow to insert the row wherever you want it. myDataTable.on( initEvent ,function() { this.addRow({ /*
    Message 1 of 9 , Feb 2, 2009
      It might be easier if you listen to initEvent and use addRow to insert
      the row wherever you want it.

      myDataTable.on('initEvent',function() {
      this.addRow({ /* object containing initial values for each field */
      },0);
      });

      Satyam


      jonathanx37 wrote:
      > I would like to customize the first row with my own data.
      >
      > Basically, datasource retrieves the info remotely, I would like to use
      > doBeforeCallback or doBeforeParseData to insert a row at index 0.
      >
      > How should I go about it?
      >
      >
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - www.avg.com
      > Version: 8.0.233 / Virus Database: 270.10.16/1929 - Release Date: 01/31/09 20:03:00
      >
      >
    • jonathanx37
      I don t think this will work through server side pagination when I click for next results. What would be the pseudo-code for going about it in the method i
      Message 2 of 9 , Feb 2, 2009
        I don't think this will work through server side pagination when I
        click for next results.

        What would be the pseudo-code for going about it in the method i
        mentioned above in a doBeforeCallBack fashion?

        --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
        >
        > It might be easier if you listen to initEvent and use addRow to insert
        > the row wherever you want it.
        >
        > myDataTable.on('initEvent',function() {
        > this.addRow({ /* object containing initial values for each field */
        > },0);
        > });
        >
        > Satyam
        >
        >
        > jonathanx37 wrote:
        > > I would like to customize the first row with my own data.
        > >
        > > Basically, datasource retrieves the info remotely, I would like to use
        > > doBeforeCallback or doBeforeParseData to insert a row at index 0.
        > >
        > > How should I go about it?
        > >
        > >
        > >
        > >
        > > ------------------------------------
        > >
        > > Yahoo! Groups Links
        > >
        > >
        > >
        > >
        ------------------------------------------------------------------------
        > >
        > >
        > > No virus found in this incoming message.
        > > Checked by AVG - www.avg.com
        > > Version: 8.0.233 / Virus Database: 270.10.16/1929 - Release Date:
        01/31/09 20:03:00
        > >
        > >
        >
      • Satyam
        The built-in doBeforeCallback simply returns its third argument untouched. That argument is an object containing, hopefully, a results property which will
        Message 3 of 9 , Feb 2, 2009
          The built-in doBeforeCallback simply returns its third argument
          untouched. That argument is an object containing, hopefully, a
          'results' property which will have an array of objects with your data,
          otherwise it will have an 'error' property. You can freely change the
          'results' array, adding records, if you want, or modifying them in any
          way you want. Whatever you return will be what the DataTable gets.

          I am not sure how you would have to manipulate the meta-data, specially
          the number of records received and the total number of records. You
          would also need to ask the server for one record less so that you can
          add your own to its response and still make the right number. I'm not
          that good with the paginator as to suggest you an alternative (if you
          had mentioned you were using the paginator, I wouldn't have replied),
          but it seems to me that going all the way to the DataSource is a little
          too much. I would try to investigate alternatives at the DataTable
          level, checking other events that might trigger when you change pages
          and adding a row then. renderEvent triggers for any refresh of the UI,
          including sorting per column, which might be too much. dataReturnEvent
          might also serve.

          Satyam


          jonathanx37 wrote:
          > I don't think this will work through server side pagination when I
          > click for next results.
          >
          > What would be the pseudo-code for going about it in the method i
          > mentioned above in a doBeforeCallBack fashion?
          >
          > --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
          >
          >> It might be easier if you listen to initEvent and use addRow to insert
          >> the row wherever you want it.
          >>
          >> myDataTable.on('initEvent',function() {
          >> this.addRow({ /* object containing initial values for each field */
          >> },0);
          >> });
          >>
          >> Satyam
          >>
          >>
          >> jonathanx37 wrote:
          >>
          >>> I would like to customize the first row with my own data.
          >>>
          >>> Basically, datasource retrieves the info remotely, I would like to use
          >>> doBeforeCallback or doBeforeParseData to insert a row at index 0.
          >>>
          >>> How should I go about it?
          >>>
          >>>
          >>>
          >>>
          >>> ------------------------------------
          >>>
          >>> Yahoo! Groups Links
          >>>
          >>>
          >>>
          >>>
          >>>
          > ------------------------------------------------------------------------
          >
          >>> No virus found in this incoming message.
          >>> Checked by AVG - www.avg.com
          >>> Version: 8.0.233 / Virus Database: 270.10.16/1929 - Release Date:
          >>>
          > 01/31/09 20:03:00
          >
          >>>
          >
          >
          >
          > ------------------------------------
          >
          > Yahoo! Groups Links
          >
          >
          >
          > ------------------------------------------------------------------------
          >
          >
          > No virus found in this incoming message.
          > Checked by AVG - www.avg.com
          > Version: 8.0.233 / Virus Database: 270.10.16/1929 - Release Date: 01/31/09 20:03:00
          >
          >
        • jonathanx37
          I see. how would you go about having to disable all rows inline cell editing and only allow the first one to have inline cell editing? ... insert ... field */
          Message 4 of 9 , Feb 3, 2009
            I see.

            how would you go about having to disable all rows inline cell editing
            and only allow the first one to have inline cell editing?



            --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
            >
            > The built-in doBeforeCallback simply returns its third argument
            > untouched. That argument is an object containing, hopefully, a
            > 'results' property which will have an array of objects with your data,
            > otherwise it will have an 'error' property. You can freely change the
            > 'results' array, adding records, if you want, or modifying them in any
            > way you want. Whatever you return will be what the DataTable gets.
            >
            > I am not sure how you would have to manipulate the meta-data, specially
            > the number of records received and the total number of records. You
            > would also need to ask the server for one record less so that you can
            > add your own to its response and still make the right number. I'm not
            > that good with the paginator as to suggest you an alternative (if you
            > had mentioned you were using the paginator, I wouldn't have replied),
            > but it seems to me that going all the way to the DataSource is a little
            > too much. I would try to investigate alternatives at the DataTable
            > level, checking other events that might trigger when you change pages
            > and adding a row then. renderEvent triggers for any refresh of the UI,
            > including sorting per column, which might be too much. dataReturnEvent
            > might also serve.
            >
            > Satyam
            >
            >
            > jonathanx37 wrote:
            > > I don't think this will work through server side pagination when I
            > > click for next results.
            > >
            > > What would be the pseudo-code for going about it in the method i
            > > mentioned above in a doBeforeCallBack fashion?
            > >
            > > --- In ydn-javascript@yahoogroups.com, Satyam <satyam@> wrote:
            > >
            > >> It might be easier if you listen to initEvent and use addRow to
            insert
            > >> the row wherever you want it.
            > >>
            > >> myDataTable.on('initEvent',function() {
            > >> this.addRow({ /* object containing initial values for each
            field */
            > >> },0);
            > >> });
            > >>
            > >> Satyam
            > >>
            > >>
            > >> jonathanx37 wrote:
            > >>
            > >>> I would like to customize the first row with my own data.
            > >>>
            > >>> Basically, datasource retrieves the info remotely, I would like
            to use
            > >>> doBeforeCallback or doBeforeParseData to insert a row at index 0.
            > >>>
            > >>> How should I go about it?
            > >>>
            > >>>
            > >>>
            > >>>
            > >>> ------------------------------------
            > >>>
            > >>> Yahoo! Groups Links
            > >>>
            > >>>
            > >>>
            > >>>
            > >>>
            > >
            ------------------------------------------------------------------------
            > >
            > >>> No virus found in this incoming message.
            > >>> Checked by AVG - www.avg.com
            > >>> Version: 8.0.233 / Virus Database: 270.10.16/1929 - Release Date:
            > >>>
            > > 01/31/09 20:03:00
            > >
            > >>>
            > >
            > >
            > >
            > > ------------------------------------
            > >
            > > Yahoo! Groups Links
            > >
            > >
            > >
            > >
            ------------------------------------------------------------------------
            > >
            > >
            > > No virus found in this incoming message.
            > > Checked by AVG - www.avg.com
            > > Version: 8.0.233 / Virus Database: 270.10.16/1929 - Release Date:
            01/31/09 20:03:00
            > >
            > >
            >
          • Satyam
            To enable editing you have to attach the method that triggers the editor to some event, such as:
            Message 5 of 9 , Feb 4, 2009
              To enable editing you have to attach the method that triggers the editor
              to some event, such as:

              myDataTable.on('clickEvent',myDataTable.onEventShowCellEditor);

              Instead of plugging it straight through, you might do it conditionally:

              myDataTable.on('clickEvent',function(oArgs) {
              if (whatever) {
              this.onEventShowCellEditor(oArgs);
              }
              });

              Satyam



              jonathanx37 wrote:
              > I see.
              >
              > how would you go about having to disable all rows inline cell editing
              > and only allow the first one to have inline cell editing?
              >
              >
              >
              > --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
              >
              >> The built-in doBeforeCallback simply returns its third argument
              >> untouched. That argument is an object containing, hopefully, a
              >> 'results' property which will have an array of objects with your data,
              >> otherwise it will have an 'error' property. You can freely change the
              >> 'results' array, adding records, if you want, or modifying them in any
              >> way you want. Whatever you return will be what the DataTable gets.
              >>
              >> I am not sure how you would have to manipulate the meta-data, specially
              >> the number of records received and the total number of records. You
              >> would also need to ask the server for one record less so that you can
              >> add your own to its response and still make the right number. I'm not
              >> that good with the paginator as to suggest you an alternative (if you
              >> had mentioned you were using the paginator, I wouldn't have replied),
              >> but it seems to me that going all the way to the DataSource is a little
              >> too much. I would try to investigate alternatives at the DataTable
              >> level, checking other events that might trigger when you change pages
              >> and adding a row then. renderEvent triggers for any refresh of the UI,
              >> including sorting per column, which might be too much. dataReturnEvent
              >> might also serve.
              >>
              >> Satyam
              >>
              >>
              >> jonathanx37 wrote:
              >>
              >>> I don't think this will work through server side pagination when I
              >>> click for next results.
              >>>
              >>> What would be the pseudo-code for going about it in the method i
              >>> mentioned above in a doBeforeCallBack fashion?
              >>>
              >>> --- In ydn-javascript@yahoogroups.com, Satyam <satyam@> wrote:
              >>>
              >>>
              >>>> It might be easier if you listen to initEvent and use addRow to
              >>>>
              > insert
              >
              >>>> the row wherever you want it.
              >>>>
              >>>> myDataTable.on('initEvent',function() {
              >>>> this.addRow({ /* object containing initial values for each
              >>>>
              > field */
              >
              >>>> },0);
              >>>> });
              >>>>
              >>>> Satyam
              >>>>
              >>>>
              >>>> jonathanx37 wrote:
              >>>>
              >>>>
              >>>>> I would like to customize the first row with my own data.
              >>>>>
              >>>>> Basically, datasource retrieves the info remotely, I would like
              >>>>>
              > to use
              >
              >>>>> doBeforeCallback or doBeforeParseData to insert a row at index 0.
              >>>>>
              >>>>> How should I go about it?
              >>>>>
              >>>>>
              >>>>>
              >>>>>
              >>>>> ------------------------------------
              >>>>>
              >>>>> Yahoo! Groups Links
              >>>>>
              >>>>>
              >>>>>
              >>>>>
              >>>>>
              >>>>>
              > ------------------------------------------------------------------------
              >
              >>>
              >>>
              >>>>> No virus found in this incoming message.
              >>>>> Checked by AVG - www.avg.com
              >>>>> Version: 8.0.233 / Virus Database: 270.10.16/1929 - Release Date:
              >>>>>
              >>>>>
              >>> 01/31/09 20:03:00
              >>>
              >>>
              >>>>>
              >>>>>
              >>>
              >>> ------------------------------------
              >>>
              >>> Yahoo! Groups Links
              >>>
              >>>
              >>>
              >>>
              >>>
              > ------------------------------------------------------------------------
              >
              >>> No virus found in this incoming message.
              >>> Checked by AVG - www.avg.com
              >>> Version: 8.0.233 / Virus Database: 270.10.16/1929 - Release Date:
              >>>
              > 01/31/09 20:03:00
              >
              >>>
              >
              >
              >
              >
              > ------------------------------------
              >
              > Yahoo! Groups Links
              >
              >
              >
              > ------------------------------------------------------------------------
              >
              >
              > No virus found in this incoming message.
              > Checked by AVG - www.avg.com
              > Version: 8.0.233 / Virus Database: 270.10.17/1931 - Release Date: 02/02/09 07:51:00
              >
              >
            • jonathanx37
              ok would it be possible to call an event to add a row like you suggested initEvent but at a moment after the paginator is called? I tried adding a row with
              Message 6 of 9 , Feb 4, 2009
                ok would it be possible to call an event to add a row
                like you suggested 'initEvent' but at a moment after the paginator is
                called?

                I tried adding a row with doBeforeCallBack except im having too many
                problems with server-side pagination.

                I'm looking for a simpler method. Is their anything available for this?


                --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
                >
                > To enable editing you have to attach the method that triggers the
                editor
                > to some event, such as:
                >
                > myDataTable.on('clickEvent',myDataTable.onEventShowCellEditor);
                >
                > Instead of plugging it straight through, you might do it conditionally:
                >
                > myDataTable.on('clickEvent',function(oArgs) {
                > if (whatever) {
                > this.onEventShowCellEditor(oArgs);
                > }
                > });
                >
                > Satyam
                >
                >
                >
                > jonathanx37 wrote:
                > > I see.
                > >
                > > how would you go about having to disable all rows inline cell editing
                > > and only allow the first one to have inline cell editing?
                > >
                > >
                > >
                > > --- In ydn-javascript@yahoogroups.com, Satyam <satyam@> wrote:
                > >
                > >> The built-in doBeforeCallback simply returns its third argument
                > >> untouched. That argument is an object containing, hopefully, a
                > >> 'results' property which will have an array of objects with your
                data,
                > >> otherwise it will have an 'error' property. You can freely
                change the
                > >> 'results' array, adding records, if you want, or modifying them
                in any
                > >> way you want. Whatever you return will be what the DataTable gets.
                > >>
                > >> I am not sure how you would have to manipulate the meta-data,
                specially
                > >> the number of records received and the total number of records. You
                > >> would also need to ask the server for one record less so that you
                can
                > >> add your own to its response and still make the right number.
                I'm not
                > >> that good with the paginator as to suggest you an alternative (if
                you
                > >> had mentioned you were using the paginator, I wouldn't have
                replied),
                > >> but it seems to me that going all the way to the DataSource is a
                little
                > >> too much. I would try to investigate alternatives at the DataTable
                > >> level, checking other events that might trigger when you change
                pages
                > >> and adding a row then. renderEvent triggers for any refresh of
                the UI,
                > >> including sorting per column, which might be too much.
                dataReturnEvent
                > >> might also serve.
                > >>
                > >> Satyam
                > >>
                > >>
                > >> jonathanx37 wrote:
                > >>
                > >>> I don't think this will work through server side pagination when I
                > >>> click for next results.
                > >>>
                > >>> What would be the pseudo-code for going about it in the method i
                > >>> mentioned above in a doBeforeCallBack fashion?
                > >>>
                > >>> --- In ydn-javascript@yahoogroups.com, Satyam <satyam@> wrote:
                > >>>
                > >>>
                > >>>> It might be easier if you listen to initEvent and use addRow to
                > >>>>
                > > insert
                > >
                > >>>> the row wherever you want it.
                > >>>>
                > >>>> myDataTable.on('initEvent',function() {
                > >>>> this.addRow({ /* object containing initial values for each
                > >>>>
                > > field */
                > >
                > >>>> },0);
                > >>>> });
                > >>>>
                > >>>> Satyam
                > >>>>
                > >>>>
                > >>>> jonathanx37 wrote:
                > >>>>
                > >>>>
                > >>>>> I would like to customize the first row with my own data.
                > >>>>>
                > >>>>> Basically, datasource retrieves the info remotely, I would like
                > >>>>>
                > > to use
                > >
                > >>>>> doBeforeCallback or doBeforeParseData to insert a row at index 0.
                > >>>>>
                > >>>>> How should I go about it?
                > >>>>>
                > >>>>>
                > >>>>>
                > >>>>>
                > >>>>> ------------------------------------
                > >>>>>
                > >>>>> Yahoo! Groups Links
                > >>>>>
                > >>>>>
                > >>>>>
                > >>>>>
                > >>>>>
                > >>>>>
                > >
                ------------------------------------------------------------------------
                > >
                > >>>
                > >>>
                > >>>>> No virus found in this incoming message.
                > >>>>> Checked by AVG - www.avg.com
                > >>>>> Version: 8.0.233 / Virus Database: 270.10.16/1929 - Release Date:
                > >>>>>
                > >>>>>
                > >>> 01/31/09 20:03:00
                > >>>
                > >>>
                > >>>>>
                > >>>>>
                > >>>
                > >>> ------------------------------------
                > >>>
                > >>> Yahoo! Groups Links
                > >>>
                > >>>
                > >>>
                > >>>
                > >>>
                > >
                ------------------------------------------------------------------------
                > >
                > >>> No virus found in this incoming message.
                > >>> Checked by AVG - www.avg.com
                > >>> Version: 8.0.233 / Virus Database: 270.10.16/1929 - Release Date:
                > >>>
                > > 01/31/09 20:03:00
                > >
                > >>>
                > >
                > >
                > >
                > >
                > > ------------------------------------
                > >
                > > Yahoo! Groups Links
                > >
                > >
                > >
                > >
                ------------------------------------------------------------------------
                > >
                > >
                > > No virus found in this incoming message.
                > > Checked by AVG - www.avg.com
                > > Version: 8.0.233 / Virus Database: 270.10.17/1931 - Release Date:
                02/02/09 07:51:00
                > >
                > >
                >
              • Satyam
                I don t know the sequence of events when the DataTable is paginated. You should put alerts or calls to the logger in each and try out which of them works out
                Message 7 of 9 , Feb 4, 2009
                  I don't know the sequence of events when the DataTable is paginated.
                  You should put alerts or calls to the logger in each and try out which
                  of them works out for you.

                  Satyam

                  jonathanx37 wrote:
                  > ok would it be possible to call an event to add a row
                  > like you suggested 'initEvent' but at a moment after the paginator is
                  > called?
                  >
                  > I tried adding a row with doBeforeCallBack except im having too many
                  > problems with server-side pagination.
                  >
                  > I'm looking for a simpler method. Is their anything available for this?
                  >
                  >
                  > --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
                  >
                  >> To enable editing you have to attach the method that triggers the
                  >>
                  > editor
                  >
                  >> to some event, such as:
                  >>
                  >> myDataTable.on('clickEvent',myDataTable.onEventShowCellEditor);
                  >>
                  >> Instead of plugging it straight through, you might do it conditionally:
                  >>
                  >> myDataTable.on('clickEvent',function(oArgs) {
                  >> if (whatever) {
                  >> this.onEventShowCellEditor(oArgs);
                  >> }
                  >> });
                  >>
                  >> Satyam
                  >>
                  >>
                  >>
                  >> jonathanx37 wrote:
                  >>
                  >>> I see.
                  >>>
                  >>> how would you go about having to disable all rows inline cell editing
                  >>> and only allow the first one to have inline cell editing?
                  >>>
                  >>>
                  >>>
                  >>> --- In ydn-javascript@yahoogroups.com, Satyam <satyam@> wrote:
                  >>>
                  >>>
                  >>>> The built-in doBeforeCallback simply returns its third argument
                  >>>> untouched. That argument is an object containing, hopefully, a
                  >>>> 'results' property which will have an array of objects with your
                  >>>>
                  > data,
                  >
                  >>>> otherwise it will have an 'error' property. You can freely
                  >>>>
                  > change the
                  >
                  >>>> 'results' array, adding records, if you want, or modifying them
                  >>>>
                  > in any
                  >
                  >>>> way you want. Whatever you return will be what the DataTable gets.
                  >>>>
                  >>>> I am not sure how you would have to manipulate the meta-data,
                  >>>>
                  > specially
                  >
                  >>>> the number of records received and the total number of records. You
                  >>>> would also need to ask the server for one record less so that you
                  >>>>
                  > can
                  >
                  >>>> add your own to its response and still make the right number.
                  >>>>
                  > I'm not
                  >
                  >>>> that good with the paginator as to suggest you an alternative (if
                  >>>>
                  > you
                  >
                  >>>> had mentioned you were using the paginator, I wouldn't have
                  >>>>
                  > replied),
                  >
                  >>>> but it seems to me that going all the way to the DataSource is a
                  >>>>
                  > little
                  >
                  >>>> too much. I would try to investigate alternatives at the DataTable
                  >>>> level, checking other events that might trigger when you change
                  >>>>
                  > pages
                  >
                  >>>> and adding a row then. renderEvent triggers for any refresh of
                  >>>>
                  > the UI,
                  >
                  >>>> including sorting per column, which might be too much.
                  >>>>
                  > dataReturnEvent
                  >
                  >>>> might also serve.
                  >>>>
                  >>>> Satyam
                  >>>>
                  >>>>
                  >>>> jonathanx37 wrote:
                  >>>>
                  >>>>
                  >>>>> I don't think this will work through server side pagination when I
                  >>>>> click for next results.
                  >>>>>
                  >>>>> What would be the pseudo-code for going about it in the method i
                  >>>>> mentioned above in a doBeforeCallBack fashion?
                  >>>>>
                  >>>>> --- In ydn-javascript@yahoogroups.com, Satyam <satyam@> wrote:
                  >>>>>
                  >>>>>
                  >>>>>
                  >>>>>> It might be easier if you listen to initEvent and use addRow to
                  >>>>>>
                  >>>>>>
                  >>> insert
                  >>>
                  >>>
                  >>>>>> the row wherever you want it.
                  >>>>>>
                  >>>>>> myDataTable.on('initEvent',function() {
                  >>>>>> this.addRow({ /* object containing initial values for each
                  >>>>>>
                  >>>>>>
                  >>> field */
                  >>>
                  >>>
                  >>>>>> },0);
                  >>>>>> });
                  >>>>>>
                  >>>>>> Satyam
                  >>>>>>
                  >>>>>>
                  >>>>>> jonathanx37 wrote:
                  >>>>>>
                  >>>>>>
                  >>>>>>
                  >>>>>>> I would like to customize the first row with my own data.
                  >>>>>>>
                  >>>>>>> Basically, datasource retrieves the info remotely, I would like
                  >>>>>>>
                  >>>>>>>
                  >>> to use
                  >>>
                  >>>
                  >>>>>>> doBeforeCallback or doBeforeParseData to insert a row at index 0.
                  >>>>>>>
                  >>>>>>> How should I go about it?
                  >>>>>>>
                  >>>>>>>
                  >>>>>>>
                  >>>>>>>
                  >>>>>>> ------------------------------------
                  >>>>>>>
                  >>>>>>> Yahoo! Groups Links
                  >>>>>>>
                  >>>>>>>
                  >>>>>>>
                  >>>>>>>
                  >>>>>>>
                  >>>>>>>
                  >>>>>>>
                  > ------------------------------------------------------------------------
                  >
                  >>>
                  >>>
                  >>>>>
                  >>>>>
                  >>>>>
                  >>>>>>> No virus found in this incoming message.
                  >>>>>>> Checked by AVG - www.avg.com
                  >>>>>>> Version: 8.0.233 / Virus Database: 270.10.16/1929 - Release Date:
                  >>>>>>>
                  >>>>>>>
                  >>>>>>>
                  >>>>> 01/31/09 20:03:00
                  >>>>>
                  >>>>>
                  >>>>>
                  >>>>>>>
                  >>>>>>>
                  >>>>>>>
                  >>>>> ------------------------------------
                  >>>>>
                  >>>>> Yahoo! Groups Links
                  >>>>>
                  >>>>>
                  >>>>>
                  >>>>>
                  >>>>>
                  >>>>>
                  > ------------------------------------------------------------------------
                  >
                  >>>
                  >>>
                  >>>>> No virus found in this incoming message.
                  >>>>> Checked by AVG - www.avg.com
                  >>>>> Version: 8.0.233 / Virus Database: 270.10.16/1929 - Release Date:
                  >>>>>
                  >>>>>
                  >>> 01/31/09 20:03:00
                  >>>
                  >>>
                  >>>>>
                  >>>>>
                  >>>
                  >>>
                  >>> ------------------------------------
                  >>>
                  >>> Yahoo! Groups Links
                  >>>
                  >>>
                  >>>
                  >>>
                  >>>
                  > ------------------------------------------------------------------------
                  >
                  >>> No virus found in this incoming message.
                  >>> Checked by AVG - www.avg.com
                  >>> Version: 8.0.233 / Virus Database: 270.10.17/1931 - Release Date:
                  >>>
                  > 02/02/09 07:51:00
                  >
                  >>>
                  >
                  >
                  >
                  > ------------------------------------
                  >
                  > Yahoo! Groups Links
                  >
                  >
                  >
                  > ------------------------------------------------------------------------
                  >
                  >
                  > No virus found in this incoming message.
                  > Checked by AVG - www.avg.com
                  > Version: 8.0.233 / Virus Database: 270.10.17/1933 - Release Date: 02/02/09 19:21:00
                  >
                  >
                • jonathanx37
                  Would their be a way to add data to the datatable after it initializes? Not on an init or a datareturn but something like an after return if that even exist?
                  Message 8 of 9 , Feb 5, 2009
                    Would their be a way to add data to the datatable after it
                    initializes? Not on an init or a datareturn but something like an
                    after return if that even exist?

                    this way i can insert a row without interfering with the paginator.

                    so it can show 1 blank record and 3 records instead of 1 blank record
                    and 2 records (as its doing now)



                    --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
                    >
                    > I don't know the sequence of events when the DataTable is paginated.
                    > You should put alerts or calls to the logger in each and try out which
                    > of them works out for you.
                    >
                    > Satyam
                    >
                    > jonathanx37 wrote:
                    > > ok would it be possible to call an event to add a row
                    > > like you suggested 'initEvent' but at a moment after the paginator is
                    > > called?
                    > >
                    > > I tried adding a row with doBeforeCallBack except im having too many
                    > > problems with server-side pagination.
                    > >
                    > > I'm looking for a simpler method. Is their anything available for
                    this?
                    > >
                    > >
                    > > --- In ydn-javascript@yahoogroups.com, Satyam <satyam@> wrote:
                    > >
                    > >> To enable editing you have to attach the method that triggers the
                    > >>
                    > > editor
                    > >
                    > >> to some event, such as:
                    > >>
                    > >> myDataTable.on('clickEvent',myDataTable.onEventShowCellEditor);
                    > >>
                    > >> Instead of plugging it straight through, you might do it
                    conditionally:
                    > >>
                    > >> myDataTable.on('clickEvent',function(oArgs) {
                    > >> if (whatever) {
                    > >> this.onEventShowCellEditor(oArgs);
                    > >> }
                    > >> });
                    > >>
                    > >> Satyam
                    > >>
                    > >>
                    > >>
                    > >> jonathanx37 wrote:
                    > >>
                    > >>> I see.
                    > >>>
                    > >>> how would you go about having to disable all rows inline cell
                    editing
                    > >>> and only allow the first one to have inline cell editing?
                    > >>>
                    > >>>
                    > >>>
                    > >>> --- In ydn-javascript@yahoogroups.com, Satyam <satyam@> wrote:
                    > >>>
                    > >>>
                    > >>>> The built-in doBeforeCallback simply returns its third argument
                    > >>>> untouched. That argument is an object containing, hopefully, a
                    > >>>> 'results' property which will have an array of objects with your
                    > >>>>
                    > > data,
                    > >
                    > >>>> otherwise it will have an 'error' property. You can freely
                    > >>>>
                    > > change the
                    > >
                    > >>>> 'results' array, adding records, if you want, or modifying them
                    > >>>>
                    > > in any
                    > >
                    > >>>> way you want. Whatever you return will be what the DataTable
                    gets.
                    > >>>>
                    > >>>> I am not sure how you would have to manipulate the meta-data,
                    > >>>>
                    > > specially
                    > >
                    > >>>> the number of records received and the total number of records.
                    You
                    > >>>> would also need to ask the server for one record less so that you
                    > >>>>
                    > > can
                    > >
                    > >>>> add your own to its response and still make the right number.
                    > >>>>
                    > > I'm not
                    > >
                    > >>>> that good with the paginator as to suggest you an alternative (if
                    > >>>>
                    > > you
                    > >
                    > >>>> had mentioned you were using the paginator, I wouldn't have
                    > >>>>
                    > > replied),
                    > >
                    > >>>> but it seems to me that going all the way to the DataSource is a
                    > >>>>
                    > > little
                    > >
                    > >>>> too much. I would try to investigate alternatives at the
                    DataTable
                    > >>>> level, checking other events that might trigger when you change
                    > >>>>
                    > > pages
                    > >
                    > >>>> and adding a row then. renderEvent triggers for any refresh of
                    > >>>>
                    > > the UI,
                    > >
                    > >>>> including sorting per column, which might be too much.
                    > >>>>
                    > > dataReturnEvent
                    > >
                    > >>>> might also serve.
                    > >>>>
                    > >>>> Satyam
                    > >>>>
                    > >>>>
                    > >>>> jonathanx37 wrote:
                    > >>>>
                    > >>>>
                    > >>>>> I don't think this will work through server side pagination when I
                    > >>>>> click for next results.
                    > >>>>>
                    > >>>>> What would be the pseudo-code for going about it in the method i
                    > >>>>> mentioned above in a doBeforeCallBack fashion?
                    > >>>>>
                    > >>>>> --- In ydn-javascript@yahoogroups.com, Satyam <satyam@> wrote:
                    > >>>>>
                    > >>>>>
                    > >>>>>
                    > >>>>>> It might be easier if you listen to initEvent and use addRow to
                    > >>>>>>
                    > >>>>>>
                    > >>> insert
                    > >>>
                    > >>>
                    > >>>>>> the row wherever you want it.
                    > >>>>>>
                    > >>>>>> myDataTable.on('initEvent',function() {
                    > >>>>>> this.addRow({ /* object containing initial values for each
                    > >>>>>>
                    > >>>>>>
                    > >>> field */
                    > >>>
                    > >>>
                    > >>>>>> },0);
                    > >>>>>> });
                    > >>>>>>
                    > >>>>>> Satyam
                    > >>>>>>
                    > >>>>>>
                    > >>>>>> jonathanx37 wrote:
                    > >>>>>>
                    > >>>>>>
                    > >>>>>>
                    > >>>>>>> I would like to customize the first row with my own data.
                    > >>>>>>>
                    > >>>>>>> Basically, datasource retrieves the info remotely, I would like
                    > >>>>>>>
                    > >>>>>>>
                    > >>> to use
                    > >>>
                    > >>>
                    > >>>>>>> doBeforeCallback or doBeforeParseData to insert a row at
                    index 0.
                    > >>>>>>>
                    > >>>>>>> How should I go about it?
                    > >>>>>>>
                    > >>>>>>>
                    > >>>>>>>
                    > >>>>>>>
                    > >>>>>>> ------------------------------------
                    > >>>>>>>
                    > >>>>>>> Yahoo! Groups Links
                    > >>>>>>>
                    > >>>>>>>
                    > >>>>>>>
                    > >>>>>>>
                    > >>>>>>>
                    > >>>>>>>
                    > >>>>>>>
                    > >
                    ------------------------------------------------------------------------
                    > >
                    > >>>
                    > >>>
                    > >>>>>
                    > >>>>>
                    > >>>>>
                    > >>>>>>> No virus found in this incoming message.
                    > >>>>>>> Checked by AVG - www.avg.com
                    > >>>>>>> Version: 8.0.233 / Virus Database: 270.10.16/1929 - Release
                    Date:
                    > >>>>>>>
                    > >>>>>>>
                    > >>>>>>>
                    > >>>>> 01/31/09 20:03:00
                    > >>>>>
                    > >>>>>
                    > >>>>>
                    > >>>>>>>
                    > >>>>>>>
                    > >>>>>>>
                    > >>>>> ------------------------------------
                    > >>>>>
                    > >>>>> Yahoo! Groups Links
                    > >>>>>
                    > >>>>>
                    > >>>>>
                    > >>>>>
                    > >>>>>
                    > >>>>>
                    > >
                    ------------------------------------------------------------------------
                    > >
                    > >>>
                    > >>>
                    > >>>>> No virus found in this incoming message.
                    > >>>>> Checked by AVG - www.avg.com
                    > >>>>> Version: 8.0.233 / Virus Database: 270.10.16/1929 - Release Date:
                    > >>>>>
                    > >>>>>
                    > >>> 01/31/09 20:03:00
                    > >>>
                    > >>>
                    > >>>>>
                    > >>>>>
                    > >>>
                    > >>>
                    > >>> ------------------------------------
                    > >>>
                    > >>> Yahoo! Groups Links
                    > >>>
                    > >>>
                    > >>>
                    > >>>
                    > >>>
                    > >
                    ------------------------------------------------------------------------
                    > >
                    > >>> No virus found in this incoming message.
                    > >>> Checked by AVG - www.avg.com
                    > >>> Version: 8.0.233 / Virus Database: 270.10.17/1931 - Release Date:
                    > >>>
                    > > 02/02/09 07:51:00
                    > >
                    > >>>
                    > >
                    > >
                    > >
                    > > ------------------------------------
                    > >
                    > > Yahoo! Groups Links
                    > >
                    > >
                    > >
                    > >
                    ------------------------------------------------------------------------
                    > >
                    > >
                    > > No virus found in this incoming message.
                    > > Checked by AVG - www.avg.com
                    > > Version: 8.0.233 / Virus Database: 270.10.17/1933 - Release Date:
                    02/02/09 19:21:00
                    > >
                    > >
                    >
                  Your message has been successfully submitted and would be delivered to recipients shortly.