Search the web
Sign In
New User? Sign Up
ydn-javascript · Yahoo! User Interface Library Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Datatable Add Row Issue with respect to Paginator   Message List  
Reply | Forward Message #30908 of 52120 |
Re: Datatable Add Row Issue with respect to Paginator

--- In ydn-javascript@yahoogroups.com, "myworld100us"
<myworld100us@...> wrote:
>
> I have a data table which is paginated , I do client side Pagination .
> Lets say the data table has 5 pages . When I try to add a new row on
> the first page its fine , when I try to add a new row in the second or
> third page , it always goes and adds on the First Page .
>
> IS there a possible way by which I can add a new row on the respective
> Page which the user has selected .
>

You can use the second parameter to addRow to specify the index that
the new record should be added into the DataTable's RecordSet.
http://developer.yahoo.com/yui/docs/YAHOO.widget.DataTable.html#method_addRow

Generically, you can use something like this:

var idx = myDataTable.get('paginator').getStartIndex();
myDataTable.addRow(newData, idx);

Hope this helps,
Luke




Tue May 13, 2008 10:06 pm

y_lsmith
Online Now Online Now
Send Email Send Email

Forward
Message #30908 of 52120 |
Expand Messages Author Sort by Date

I have a data table which is paginated , I do client side Pagination . Lets say the data table has 5 pages . When I try to add a new row on the first page its...
myworld100us
Offline Send Email
May 13, 2008
5:59 pm

... You can use the second parameter to addRow to specify the index that the new record should be added into the DataTable's RecordSet. ...
y_lsmith
Online Now Send Email
May 13, 2008
10:06 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help