Hi all,
I have a RadGrid with has a custom template for inserting records. Once I insert the record, I try to close the insert template with the following code:
Calling the Rebind() method throws the following error:
Column 'Function_Key_Description' does not belong to table DefaultView.
The code for the RadGrid is below.
Can anyone tell me why the Rebind method is throwing this error on the GridImageColumn?
Thanks,
Sunny
I have a RadGrid with has a custom template for inserting records. Once I insert the record, I try to close the insert template with the following code:
else if (e.CommandName == RadGrid.PerformInsertCommandName) { e.Canceled = true; e.Item.OwnerTableView.InsertItem(); RadGrid_Visitor_RT.MasterTableView.IsItemInserted = false; RadGrid_Visitor_RT.Rebind(); }Calling the Rebind() method throws the following error:
Column 'Function_Key_Description' does not belong to table DefaultView.
The code for the RadGrid is below.
<telerik:RadGrid ID="RadGrid_Visitor_RT" runat="server" AutoGenerateColumns="false" Width="100%" AllowMultiRowSelection="false" AllowPaging="True" AllowCustomPaging="False" PageSize="10" AllowAutomaticInserts="False" GridLines="None" CellPadding="0" AllowSorting="false" Skin="Outlook" OnItemDataBound="Visitor_RT_ItemDataBound" ItemStyle-VerticalAlign="Top" OnNeedDataSource="RadGrid_Visitor_RT_NeedDataSource" OnItemCommand="RadGrid_Visitor_RT_ItemCommand"> <PagerStyle Mode="NextPrevAndNumeric"/> <MasterTableView Width="100%" CommandItemDisplay="Top" GridLines="None" AllowAutomaticInserts="True"> <CommandItemSettings ShowAddNewRecordButton="true" AddNewRecordText="Create Transaction" ShowRefreshButton="false" ShowExportToCsvButton="false" ShowExportToExcelButton="false" ShowExportToPdfButton="false" ShowExportToWordButton="false"/> <Columns> <telerik:GridBoundColumn UniqueName="User_Logs_Auto_ID" DataField="User_Logs_Auto_ID" HeaderText="Log ID" Visible="false"/> <telerik:GridBoundColumn UniqueName="User_Logs_DateTime" DataField="User_Logs_DateTime" HeaderText="Time" HeaderStyle-Width="35%" Visible="true" ItemStyle-VerticalAlign="Top" /> <telerik:GridImageColumn DataType="System.String" AlternateText="F_Key" DataAlternateTextField="Function_Key_Description" UniqueName="GridImageColumn_Function_Key" ImageAlign="Middle" ImageHeight="16px" ImageWidth="23px" HeaderText="" DataImageUrlFields="Function_Key_Description" DataImageUrlFormatString="Images/OnTime_Fkeys/{0}.png" HeaderStyle-Width="10%"/> <telerik:GridBoundColumn UniqueName="Terminal_Name" DataField="Terminal_Name" HeaderText="Terminal Name" HeaderStyle-Width="25%" Visible="true" ItemStyle-VerticalAlign="Top"/> <telerik:GridBoundColumn UniqueName="Terminal_Location" DataField="Terminal_Location" HeaderText="Terminal Location" HeaderStyle-Width="30%" Visible="true" ItemStyle-VerticalAlign="Top"/> </Columns>Can anyone tell me why the Rebind method is throwing this error on the GridImageColumn?
Thanks,
Sunny