The page structure is like this: Master > Content > RadSplitter > RadPane > RadAjaxPanel > PlaceHolder > UserControl > RadAjaxPanel > RadGrid.
Please give me a solution for this problem. FYI:'the grid has the OnUpdateCommand property set with my event handlers name and the AllowAutomatedUpdates property is set to true. Everything SHOULD work fine.... but it doesn't.
8 Answers, 1 is accepted
What I suspect here is a problem with the way of loading the user control dynamically which often appears when using AJAX. To verify that, would you please try removing the AJAX Panels from the setup temporary and see if the events are fired as expected? If I'm right in my assumptions, please review the tutorial available in the documentation here about loading user controls.
I'd also suggest you switch to the RadAjaxManager/Proxy setup instead. You can read more about that in the following help articles:
RadAjax and WebUserControls
Using RadAjaxManagerProxy control
Regards,
Konstantin Petkov
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I am having the same problem. I have wired up my OnUpdateCommand as Hendrik has. I have tried moving the grid to a non-Ajax panel and the update event is still not firing. The ItemCommand is firing as expected (to open the row in edit mode), but when I try to update it, no event gets fired...
Here is the code for the RadGrid in the ascx; Does everything look right?
<telerik:RadGrid ID="grdGauges" runat="server" Skin="Gray" AutoGenerateColumns="False" | |
ShowHeader="false" onupdatecommand="grdGauges_UpdateCommand" | |
onitemcommand="grdGauges_ItemCommand" EnableViewState="true" | |
AllowAutomaticUpdates="true" onitemupdated="grdGauges_ItemUpdated" > | |
<MasterTableView EditMode="EditForms" DataKeyNames="Type"> | |
<RowIndicatorColumn> | |
<HeaderStyle Width="20px" /> | |
</RowIndicatorColumn> | |
<ExpandCollapseColumn> | |
<HeaderStyle Width="20px" /> | |
</ExpandCollapseColumn> | |
<Columns> | |
<telerik:GridEditCommandColumn ButtonType="LinkButton" UniqueName="clEdit"></telerik:GridEditCommandColumn> | |
<telerik:GridBoundColumn DataField="Type" HeaderText="Type" ReadOnly="true" UniqueName="Type"> | |
</telerik:GridBoundColumn> | |
<telerik:GridBoundColumn DataField="SerialNumber" HeaderText="Serial No." UniqueName="SerialNumber"> | |
</telerik:GridBoundColumn> | |
</Columns> | |
</MasterTableView> | |
<FilterMenu EnableTheming="True" Skin="Gray"> | |
<CollapseAnimation Duration="200" Type="OutQuint" /> | |
</FilterMenu> | |
</telerik:RadGrid> |
Can you please post a bit more info how this user control is loaded/created?
Kind regards,
Vlad
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
thanks for getting back to me.
I managed to find a simple solution... i've updated my grid so that it now uses the advanced data binding method, rather than the simple grid.DataBind() method.
This allowed the UpdateCommand/InsertCommand/DeleteCommand events to be fired, and they still work as expected when I add them to a RadAjaxPanel.
Cheers
David
Verify you don't have any .NET validators (RequiereFieldValidator, CompareValidator, etc) in your page waiting for data. In my case that was the problem. I have a page with one RadDockLayout, two RadDockZones, and a RadDock inside every zone. Every RadDock contains a UserControl, and one of them have validators. If those validators get fired when you fired the OnInsertCommand or OnUpdateCommand, none of them will get fired.
WLopez
After a few hours of pulling my hair out, I realized that I had the following two attributes set in my RadDockLayout which were the source of the problem. Once I removed the attributes, the Update/Insert Commands were firing.
EnableViewState="False"
StoreLayoutInViewState="False"
Dear Telerik staff,
I have a empty "RadGrid1" and hyper links "A","ALL"... on default.aspx page.
On click of "ALL" I have opened a new window pop up using "RadWindow" with radopen = ("default.aspx", radwindowID) method. This will pop up the window on same(default.aspx) page. Now this radwindow is defined on default.aspx page with a another radgrid "radgrid2" in it using content template tags of radwindow. The radgrid2 also has a template column with command = "move to selected" which on click will move the corresponding row from radgrid2 to radgrid1 and hide that row in radgrid2. This process can fill up radgrid1(which was empty). The radgrid2 has "onitemcommand = "radgrid1_itemcommand"" property set to handle click event from template column (command name = "move to selected"), this property has logic for hiding row in radgrid2 and moving row to radgrid1.
Now I have been able to open the window on same page with radgrid2 in it with template column "+" in it.
The page get loads and all GUI gets displayed properly along with radgrid1 and links. WHen I click "ALL" the radwindow gets pop up with data filled radgrid2 with template column "+" in it.
The problem is, when I click "+" i.e. template column for first time the "radgrid1_itemcommand" method does not get fired. But from second click onwards the command gets fired and all workds well (i.e. rows get move to radgrid1 from radgrid2).
On click of template column the radgrid1_itemcommand does not gets fired for first time and because of that, the row does not get move from radgrid2 to radgrid1 only for first time. BUt ll works on and after second click on template column.
PFA the images of my current scenario where "Radgrid_image1" is image where I click on "+" for first time and nothing happens and "radgrid_image2" is image where the row moves to radgrid1 and get hidden in radgrid2.
Ihave used following
<telerik:RadAjaxManager runat="server" ID="radAjax" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid2">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid2"/>
<telerik:AjaxUpdatedControl ControlID="RadGridfirst" />
</UpdatedControls>
</telerik:AjaxSetting>
</telerik:RadAjaxManager>
Important thing that when I comment the above ajax setting code, all start to work well even for firts time i.e. rows gets shifted from from first click on template column. But this process closes the radwindow every time the template column getsclicked, so I have to click "ALL" again for opning the radwindow which is not at all my requirement.
Kindly reply
Thanks and Regards
Please test the suggestion provided in the official support ticket opened for this issue.
Kind regards,
Maria Ilieva
the Telerik team