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.
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
how to reset paginator   Message List  
Reply | Forward Message #36444 of 52127 |
Re: [ydn-javascript] Re: how to reset paginator

thank you so much. it works.

2008/8/20, Lucas Smith <lsmith@...>:
> --- In ydn-javascript@yahoogroups.com, WongTseng
> <wangzengverycool@...> wrote:
>>
>> I've used datatable on a search panel, using pagination function.
>> When user closes the search panel, I want to clear all the data
>> received from the server, and the pagination links. I use the
>> deleteRecords method to remove all the records, but I can not clear
>> the pagination links. Even I call the destroy method on the paginator,
>> when the search panel is displayed again, the pagination links are
>> still there. How can I solve this problem?
>>
>> --
>> Thanks
>> Wong Tseng
>>
>
> You should be able to use the DataTable's initializeTable() method to
> clear all rows. Incidentally, there is a bug (omission, really)
> whereby initializeTable doesn't update the Paginator's totalRecords
> attribute. This is fixed in the upcoming 2.6 version. You can patch
> this via
> myDataTable.initializeTable = function () {
> this.get('paginator').set('totalRecords',0);
> YAHOO.widget.DataTable.prototype.initializeTable.call(this);
> };
>
> In your case, I would look at the Paginator's alwaysVisible attribute
> if you don't want to display pagination controls unless there is
> reason to.
>
> Hope this helps,
> Luke
>
>


--
Best Regards
Wong Tseng



Thu Aug 21, 2008 2:54 am

wong.tseng
Offline Offline
Send Email Send Email

Forward
Message #36444 of 52127 |
Expand Messages Author Sort by Date

I've used datatable on a search panel, using pagination function. When user closes the search panel, I want to clear all the data received from the server, and...
WongTseng
wong.tseng
Offline Send Email
Aug 20, 2008
12:03 pm

... You should be able to use the DataTable's initializeTable() method to clear all rows. Incidentally, there is a bug (omission, really) whereby...
Lucas Smith
y_lsmith
Offline Send Email
Aug 20, 2008
3:50 pm

thank you so much. it works. ... -- Best Regards Wong Tseng...
WongTseng
wong.tseng
Offline Send Email
Aug 21, 2008
2:54 am

I'm having trouble overriding the initializeTable method in the way you described below - I stripped the part about the paginator out so the function body was ...
cc_fo
Offline Send Email
Aug 22, 2008
3:27 pm

Disregard, the issue was only tangentially related to this (incorrect use of paginationRecordOffset...) ... paginator,...
cc_fo
Offline Send Email
Aug 22, 2008
3:51 pm
Advanced

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