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

Client side binding / paging problem with double call to GetData function

0 Answers 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 06 Jun 2012, 01:54 AM
I am using client side binding to the grid. When I first load the page, I get a single call to my GetData() web service method as expected. If I click a number in the pager, however, I get the first call and data returned as expected, but then the grid calls the data function again and reloads the data with the parameters set as though the first page is being requested, which means the grid can never show pages other than the first page.

Your documentation has guidance on how to keep this from happening, but I have not been able to get any of the techniques to work:

http://www.telerik.com/help/aspnet-ajax/grid-custom-paging.html

I also tried this technique:

http://demos.telerik.com/aspnet-ajax/grid/examples/client/declarativedatabinding/defaultcs.aspx

But for some reason my GetDataAndCount() web service method was never called. The example does not say how the ClientSettings DataBinding properties should be set in this instance, so that might be the problem. How should they be set? Are there any other properties on the grid that need to be set to make this work, or is there a way to tell from the client side object model that the grid is calling the client side data binding function for the second time so that the argument can be set to cancel?

Another related question: I can use

sender.get_masterTableView().get_columns()[0].set_visible(false);
sender.get_masterTableView().get_columns()[0].Display = false;

to hide a column client side during the data binding call. But if I set

sender.get_masterTableView().get_columns()[0].set_visible(true);
sender.get_masterTableView().get_columns()[0].Display = true;

the column does not reappear. Is there another function I should be calling, or should this be done during another event? I would like to manage the visibility of certain columns client side. Is this possible?

No answers yet. Maybe you can help?

Tags
Grid
Asked by
John
Top achievements
Rank 1
Share this question
or