hi all
I am using radgrid in my application , in that i need to enable the grouping feature, so i set AllowGrouping=true , ShowGroupPanel = true and AllowDragtoGroup = true. It works fine when i try to drag and drop a integer type column(eg:Salary) into the groupPanel but when i drag and drop a string type column(eg: Product Name) it throws an exception like "Could not find the column" or "Could not find the column index -1(Out of Range Exception)".
When the column name contains Space in it (eg: Product Name) the exception is like " Cloud not find the Column Product" i.e., it does not read the Name in Product Name.
Please tell me how to fix this issue it is very urgent.
Thanks in Advance
<telerik:RadTickerItem>Breaking News: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt</telerik:RadTickerItem>?
Thank you
Jayesh
.RadScheduler_Default .rsMonthView .rsOtherMonth{ background-color: #fff !important; background-image: none !important;}.RadScheduler_Default .rsOtherMonth div{ display: none;}<telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="grdTradesFile"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="grdTradesFile" LoadingPanelID="RadAjaxLoadingPanel1"/> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" Width="75px" Transparency="50" /> <telerik:RadGrid ID="grdTradesFile" runat="server" Skin="Web20" Width="97%" AllowMultiRowSelection="True" AllowMultiRowEdit="True" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AutoGenerateColumns="False" ShowStatusBar="true" OnNeedDataSource="grdTradesFile_NeedDataSource" SelectedItemStyle-BorderColor="Moccasin" SelectedItemStyle-BackColor="Moccasin" onitemcommand="grdTradesFile_ItemCommand" oncancelcommand="grdTradesFile_CancelCommand" oneditcommand="grdTradesFile_EditCommand" onupdatecommand="grdTradesFile_UpdateCommand" oninsertcommand="grdTradesFile_InsertCommand"> <ClientSettings> <Selecting AllowRowSelect="true" /> </ClientSettings> <MasterTableView CommandItemDisplay="Top" EditMode="InPlace" AllowAutomaticDeletes="false" AllowAutomaticInserts="true" AllowAutomaticUpdates="false" AutoGenerateColumns="false" Width="100%" DataKeyNames="Trade" ClientDataKeyNames="Trade"> <CommandItemTemplate> <asp:Button ID="Button1" runat="server" CommandName="EditSelected" Text="Edit Selected" Width="120" Visible='<%# grdTradesFile.EditIndexes.Count == 0 %>'></asp:Button> <asp:Button ID="Button2" runat="server" CommandName="CancelAll" Text="Cancel All" Width="120" Visible='<%# grdTradesFile.EditIndexes.Count != 0 %>'></asp:Button> <asp:Button ID="Button3" runat="server" CommandName="UpdateEdited" Text="Update Edited" Width="120" Visible='<%# grdTradesFile.EditIndexes.Count > 0 %>'></asp:Button> <asp:Button ID="Button4" runat="server" CommandName="DeleteSelected" Text="Delete Selected" Width="120" Visible='<%# grdTradesFile.EditIndexes.Count == 0 %>'></asp:Button> <asp:Button ID="Button5" runat="server" CommandName="InitInsert" Text="New Trade" Width="120" Visible='<%# !grdTradesFile.MasterTableView.IsItemInserted && grdTradesFile.EditIndexes.Count == 0 %>'></asp:Button> <asp:Button ID="Button6" runat="server" CommandName="PerformInsert" Text="Add Trade" Width="120" Visible='<%# grdTradesFile.MasterTableView.IsItemInserted %>'></asp:Button> </CommandItemTemplate> <Columns> <telerik:GridClientSelectColumn /> <telerik:GridBoundColumn DataField="Trade" HeaderText="TRADE" UniqueName="Trade" /> <telerik:GridBoundColumn DataField="Coupon" HeaderText="COUPON" UniqueName="Coupon" /> <telerik:GridBoundColumn DataField="Price" HeaderText="PRICE" UniqueName="Price" /> <telerik:GridBoundColumn DataField="Cross" HeaderText="PREMIUM CROSS" UniqueName="PremiumCross" /> <telerik:GridBoundColumn DataField="Comments" HeaderText="COMMENTS" UniqueName="Comments" /> </Columns> </MasterTableView> </telerik:RadGrid>protected void grdTradesFile_InsertCommand(object sender, GridCommandEventArgs e) { GridEditableItem editedItem = e.Item as GridEditableItem; DataRow newRow = tradesTable.NewRow(); DataRow[] allValues = tradesTable.Select("", PRIMARY_KEY_COLUMN_NAME, DataViewRowState.CurrentRows); if (allValues.Length > 0) { newRow[PRIMARY_KEY_COLUMN_NAME] = (int)allValues[allValues.Length - 1][PRIMARY_KEY_COLUMN_NAME] + 1; } else { newRow[PRIMARY_KEY_COLUMN_NAME] = 1; //the table is empty; } //Set new values Hashtable newValues = new Hashtable(); //The GridTableView will fill the values from all editable columns in the hash e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem); try { foreach (DictionaryEntry entry in newValues) { newRow[(string)entry.Key] = entry.Value; } } catch (Exception ex) { } tradesTable.Rows.Add(newRow); grdTradesFile.Rebind(); saveChanges(); }