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

RadGrid in update panel error

1 Answer 75 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Damien
Top achievements
Rank 1
Damien asked on 20 Dec 2012, 01:28 PM
Hello,

I try to integrate the Telerik libraries, replacing my asp:gridview by a RadGrid, and I have a problem on an update. Here is my case:

I have a page with an update panel containing a grid (asp:gridview).
On page load, I add dynamically some user controls in an asp place holder. These user controls contain their own update panel with buttons or drop down lists inside (not always the some control). When the button or the drop down list of the UC is selected, it calls some code of the business layer, and the business layer raises an event. The page (which has subscribed to this event), load a datatable, set the datatable as datasource of the grid, and bind it. I update the update panel containing the grid to refresh it. It works correctly.

I want to replace the asp:gridview by a RadGrid.

I keep the update panel containing the RadGrid, because I can't use the RadAjaxManager (even dynamically) because the controls of the user controls are not always the same (button or drop down list).

It seems to work. When I click on a user control button, the gridview is correctly displayed. If a click ONE TIME on a header, the sort is done. BUT if a click again, I obtain the following error message (same error on each action):
Microsoft JScript runtime error: Sys.InvalidOperationException: Impossible de trouver UpdatePanel avec l'ID 'RadGrid1Panel'. S'il est mis à jour dynamiquement, il doit se trouver dans un autre UpdatePanel.

To avoid the update panel problem, I tried to remove the UpdatePanel around the RadGrid and add a RadAjaxPanel (referencing a AjaxLoadingPanel) around all the page. But this time, I see the loading panel but the RadGrid is not updated after the binding. Should I do something to trigger the update ?

Thanks by advance.

Damien

1 Answer, 1 is accepted

Sort by
0
Damien
Top achievements
Rank 1
answered on 21 Dec 2012, 04:17 PM
Hi,
It seems to work if a remove all the update panels of my user controls.
Regards
Damien
Tags
Ajax
Asked by
Damien
Top achievements
Rank 1
Answers by
Damien
Top achievements
Rank 1
Share this question
or