This is a migrated thread and some comments may be shown as answers.

set_currentPageIndex call bind function again

1 Answer 23 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jagz W
Top achievements
Rank 2
Jagz W asked on 07 Dec 2012, 03:31 AM
Hi,

I am binding RADGRID in client side with paging on search button click. it is working fine with paging. but when i bind grid again on search button click, the page index not reset..

So, i tried to reset the current page index using set_currentPageIndex(0) property.. But it recalls the bind function again and all the data does wrong.


 masterGrd.set_currentPageIndex(0);

Even i tried to rebind function but that too not worked.

 masterGrd.set_currentPageIndex(0);<br><span style="font-size: 13.63636302947998px;">masterGrd</span>.rebind();

1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 11 Dec 2012, 12:41 PM
Hello Jagwinder,

When you filter using your search button, if you bind such way:
var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
tableView.set_dataSource(result);
tableView.dataBind();
the grid will go to the first page, like it is shown in this demo:
http://demos.telerik.com/aspnet-ajax/grid/examples/client/databinding/defaultcs.aspx
Examine the code and tell us what is different in your case.

Kind regards,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Jagz W
Top achievements
Rank 2
Answers by
Vasil
Telerik team
Share this question
or