I have a grid as follows. EditMode=Batch, AllowMultiRowSelection, AllowMultiRowEdit = true
When I click the save button in the CommandItemTemplate it fires this event:
When I try to update the items that have been edited in the grid the RadGrid1.EditItems.Count is always 0.
Why aren't the items that I have edited marked as edited when I try to save them?
Thanks
<telerik:RadGrid ID="RadGrid1" runat="server" ClientSettings-Selecting-AllowRowSelect="true" AutoGenerateColumns="False" AllowMultiRowSelection="true" OnNeedDataSource="RadGrid1_NeedDataSource" AllowMultiRowEdit="true"> <MasterTableView EditMode="Batch" DataKeyNames="Discipline_ID" CommandItemDisplay="Top"> <BatchEditingSettings EditType="Row" OpenEditingEvent="DblClick" /> <CommandItemTemplate> <asp:ImageButton ID="Button_Save" runat="server" ToolTip="Save" ImageUrl="~/dhtmlx/imgs/save.png" Height="20" Width="20" style="padding:5px 0 0 5px;" OnClick="Button_Save_Click" /> </CommandItemTemplate> <Columns> <telerik:GridBoundColumn DataField="Discipline_ID" Display="false" UniqueName="Discipline_ID"></telerik:GridBoundColumn> <telerik:GridClientSelectColumn UniqueName="SelectCheckBox" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="50px"></telerik:GridClientSelectColumn> <telerik:GridBoundColumn DataField="Name" HeaderText="Name" UniqueName="Name" AllowSorting="true"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Description" HeaderText="Description" UniqueName="Description" AllowSorting="true"></telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid>When I click the save button in the CommandItemTemplate it fires this event:
protected void Button_Save_Click(object sender, ImageClickEventArgs e) { foreach (GridDataItem item in RadGrid1.EditItems) { Hashtable newValues = new Hashtable(); item.OwnerTableView.ExtractValuesFromItem(newValues, item); } }When I try to update the items that have been edited in the grid the RadGrid1.EditItems.Count is always 0.
Why aren't the items that I have edited marked as edited when I try to save them?
Thanks
