Hello,
I am trying to work with an editable grid where an item goes into edit mode with a double click and the updates are done in batch. The code is based loosely on the batch update sample project at http://www.telerik.com/help/aspnet-ajax/grdperformingbatchupdates.html.
When I edit an item and make changes, then double click another item to edit, the data chagned for the first item is lost. Is there a way to preserve the data and keep it displayed on the screen.
Thanks in advance!
function
RowDblClicked(sender, eventArgs) {
var masterTable = $find("<%= RadGrid1.MasterTableView.ClientID %>");
var selItem = masterTable.get_selectedItems()[0];
if (selItem) {
masterTable.editItem(selItem.get_element());
}
}
<
telerik:RadGrid AllowMultiRowEdit="true" AllowMultiRowSelection="false"
ID
="RadGrid1" runat="server" OnItemCommand="RadGrid1_ItemCommand" >
<MasterTableView DataKeyNames="OrderID,ProductID" CommandItemDisplay="Top" EditMode="InPlace">
CommandItemTemplate>
<asp:LinkButton ID="LinkButton1" CommandName="UpdateChanges" runat="server">Update all</asp:LinkButton>
</CommandItemTemplate>
</MasterTableView>
<ClientSettings>
<
Selecting AllowRowSelect="True"></Selecting>
<ClientEvents OnRowDblClick="RowDblClicked" />
</ClientSettings>
</
telerik:RadGrid>