Hello everyone,
I am trying to implement a RadGrid that supports Batch editing. The main reason I want to implement this feature (EditMode="Batch") is to be able to add new records inline in the grid. I have been able to get the new record functionality that I desire, but it has broken the functionality that I implemented for both a double click and right click. Inline editing is not a requirement for me. Is there anyway to allow for inline additions of new records, while disabling the inline edit functionality in order to allow for right click and double click functionality of already added records?
RadGrid/MasterTableView ASPX:
Right Click Functionality (C#):
DoubleClick Functionality (JS):
Once again, my main goal is to be able to add new records inline within the RadGrid while maintaining already implemented rightclick and doubleclick functionality. Any help I can get would be greatly appreciated. Thanks!
-Matt
I am trying to implement a RadGrid that supports Batch editing. The main reason I want to implement this feature (EditMode="Batch") is to be able to add new records inline in the grid. I have been able to get the new record functionality that I desire, but it has broken the functionality that I implemented for both a double click and right click. Inline editing is not a requirement for me. Is there anyway to allow for inline additions of new records, while disabling the inline edit functionality in order to allow for right click and double click functionality of already added records?
RadGrid/MasterTableView ASPX:
<telerik:RadGrid ID="RadGridActionItem" runat="server" AllowSorting="True" AllowPaging="true" AllowFilteringByColumn="True" OnNeedDataSource="RadGridActionItem_NeedDataSource" OnPageIndexChanged="RadGridActionItem_PageIndexChanged" OnItemCreated="RadGridAction_ItemCreated" OnDeleteCommand="RadGridActionItem_DeleteCommand" OnInsertCommand="RadGridActionItem_InsertCommand" AllowMultiRowEdit="True" OnItemDataBound="RadGridActionItem_ItemDataBound" Width="80%" HorizontalAlign="Center" PageSize="15" EnableViewState="true" Skin="Windows7"> <GroupingSettings CaseSensitive="false" /> <MasterTableView AutoGenerateColumns="false" ShowFooter="true" DataKeyNames="Action_Item_Id" ClientDataKeyNames="Action_Item_Id" CommandItemDisplay="Top" Width="100%" HorizontalAlign="Center" EditMode="Batch">Right Click Functionality (C#):
protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e){ // Right click context menu selection event. int radGridClickRowIndex; string actionItemId; bool copied = true; // Get row index and Action_Item_Id associated with row radGridClickRowIndex = Convert.ToInt32(Request.Form["radGridClickedRowIndex"]); actionItemId = RadGridActionItem.MasterTableView.DataKeyValues[radGridClickRowIndex]["Action_Item_Id"].ToString(); switch (e.Item.Text) { case "Copy": Response.Redirect("NewActionItem.aspx?ActionId=" + actionItemId + "&IsCopied=" + copied); break; }}DoubleClick Functionality (JS):
<script type="text/javascript"> function RowDblClick(sender, args) { var dblClick; dblClick = true; var index = args.get_itemIndexHierarchical(); var updateActionId = args.getDataKeyValue("Action_Item_Id"); window.location.href = "NewActionItem.aspx?DblClick=" + dblClick + "&UpdateActionId=" + updateActionId; }</script>Once again, my main goal is to be able to add new records inline within the RadGrid while maintaining already implemented rightclick and doubleclick functionality. Any help I can get would be greatly appreciated. Thanks!
-Matt