Hello,
I'm having a problem with ClientEvents on a RadGrid being applied to all child grids contained within the parent grid. I have a grid configured like this:
The editRow function is as follows:
The grid functions beautifully and the edit form loads and submits successfully. However, there is a secondary grid in the edit form (EditForm.ascx) which seems to be inheriting the ClientSettings from the parent grid, such that if you double click one of the rows inside the user control then editRow fires and the item being edited is changed (because get_itemIndexHierarchical returns the index of the item double clicked inside EditForm.ascx).
I've looked at the events and documentation, but do not see a way to clear the client settings on the child grids. I can probably work around it by using a button for editing instead of the double click event, but the client specifically requested the double click. Does anyone have an idea on how I can clear the client settings on the grid within the EditForm.ascx user control? I really want to get rid of both the event handler and the hover style from the grids within EditForm.ascx.
Thanks in advance for any help!
I'm having a problem with ClientEvents on a RadGrid being applied to all child grids contained within the parent grid. I have a grid configured like this:
<telerik:RadGrid ID="myGrid" runat="server" AllowSorting="true" AutoGenerateColumns="false" AllowPaging="true" PageSize="50" Height="500"> <MasterTableView> <Columns> <telerik:GridBoundColumn Visible="false" DataField="Id" UniqueName="Id" /> <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" UniqueName="FirstName" /> <telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name" UniqueName="Last Name" /> </Columns> <EditFormSettings EditFormType="WebUserControl" UserControlName="~/EditForm.ascx" /> </MasterTableView> <ClientSettings EnableRowHoverStyle="true"> <Scrolling UseStaticHeaders="True" AllowScroll="True" /> <ClientEvents OnRowDblClick="editRow" /> </ClientSettings></telerik:RadGrid>The editRow function is as follows:
function editRow(sender, eventArgs) { sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());}The grid functions beautifully and the edit form loads and submits successfully. However, there is a secondary grid in the edit form (EditForm.ascx) which seems to be inheriting the ClientSettings from the parent grid, such that if you double click one of the rows inside the user control then editRow fires and the item being edited is changed (because get_itemIndexHierarchical returns the index of the item double clicked inside EditForm.ascx).
I've looked at the events and documentation, but do not see a way to clear the client settings on the child grids. I can probably work around it by using a button for editing instead of the double click event, but the client specifically requested the double click. Does anyone have an idea on how I can clear the client settings on the grid within the EditForm.ascx user control? I really want to get rid of both the event handler and the hover style from the grids within EditForm.ascx.
Thanks in advance for any help!