This is a migrated thread and some comments may be shown as answers.
Refresh 2 RadGrids on window close
2 Answers 24 Views
This is a migrated thread and some comments may be shown as answers.
Joseph
Top achievements
Rank 2
Joseph asked on 28 Jan 2012, 07:41 PM
Hi Telerik Community,

I have two RadGrids sitting on a page, both inside a RadAjaxPanel. When I have RadWindow close, my add_close function (oWnd.add_close(RefreshAfterMatch);) will only refresh one of the two grids (perDiemBookingsRadGrid). Here is my function:
function RefreshAfterMatch() {
            var matchMasterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
            var pdMasterTable = $find("<%= perDiemBookingsRadGrid.ClientID %>").get_masterTableView();
            matchMasterTable.rebind();
            pdMasterTable.rebind();
        }

Any ideas on how to get both grids to rebind?

Thanks,
Joe

2 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 31 Jan 2012, 03:10 PM
Hi Joe,

The rebind() cilent-side command fires the server-side code to rebind the grid it is called from, so both grids will perform requests and the first will be cancelled as this is the way AJAX works.

I can offer you several ways to go around this:

1) increase the value of the RequestQueueSize property of the panel

OR

2) use the RadAjaxManager to perform an AJAX request for both grids (e.g. you could pass a parameter that will indicate in the code-behind that these two grids need to be rebound) instead of the client-side rebind() method

OR

3) use a regular update panel around both grids and a hidden button inside that will invoke the request to rebind the grids. This button's request can be initiated via the __doPostBack() command by passing its UniqueID as the first parameter. Again rebind() should be called from the server this time.


Greetings,
Marin
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
0
Joseph
Top achievements
Rank 2
answered on 31 Jan 2012, 10:46 PM
Option 1 - Increasing the RequestQueueSize did the trick - Thanks!
Asked by
Joseph
Top achievements
Rank 2
Answers by
Marin Bratanov
Telerik team
Joseph
Top achievements
Rank 2
Share this question
or