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

[Solved] radgrid edit window

1 Answer 114 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Software
Top achievements
Rank 1
Software asked on 24 Mar 2008, 11:31 PM
I'm trying to open an edit window from the grid.
I followed the sample and it works fine.  However, if I sort the grid, I get an error    Sys.InvalidOperationException: Two components with the same id 'DialogWindow' can't be added to the application.
DialogWindow is my window name in the open window call. I have the ajax manager updating the window manager when the grid changes.
If I remove the control pair in the ajax manager, it works again.
What am I doing wrong or not doing here?

Thanks,
Eric

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 26 Mar 2008, 12:56 PM
Hi Eric,

Indeed, updating RadWindowManager with AJAX is not recommended, when used in client-side scenarios like this. Do you need RadWindowManager to be updated when RadGrid performs ajax request? If not - you have already noticed that you can simply remove RadWindowManager control from UpdateControls in the corresponding  AjaxSetting. If you need to update RadWindowManager, you can use the following javascript code to show RadWindow, instead of radopen:

var oWnd = $find('<%=DialogWindow.ClientID %>'); 
oWnd.setUrl("EditFormCS.aspx?EmployeeID=" + id); 
oWnd.show();     

As for the online example - it seems, there is a different error there. After enabling sorting in the grid, you will need to provide a secondAjaxSetting with RadGrid as AjaxControl and as UpdatedControl ad the same time.

Hope this helps.

Greetings,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Software
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or