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...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Click here for the latest updates on Groups Message search

Messages

  Messages Help
Advanced
Datatable Add Row Issue with respect to Paginator   Topic List   < Prev Topic  |  Next Topic >
Reply  |  Next Message > 
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

 |  Next Message > 
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 © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help