--- 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