I'm following the demo for Grid/Filtering Template Columns and am able to create and add my custom filter column (with a dropdownlist for selecting the value) but when the bind occurs on the grid I am getting an error that indicates that the grid is attempting to bind data to the row containing the filtering control.
My FilteringTemplateColumn is almost exactly the same as in the demo, except for how the droplist is populated. I'm using a generic dictionary to populate the droplist. There error I am receiving is
I'm sure I'm missing something simple. Thank you for your help.
Sean M. Severson
My FilteringTemplateColumn is almost exactly the same as in the demo, except for how the droplist is populated. I'm using a generic dictionary to populate the droplist. There error I am receiving is
Object of type System.Collections.Generic.KeyValuePair`2[System.String,System.String] does not have a CreatedBy.ID property.
CreatedBy.ID is the DataField property for my custom filtering template column and is also used in the template in a label control via an Eval("CreatedBy.ID")
<form id="form1" runat="server"> <div> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <telerik:RadAjaxManagerProxy ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="FilterableRadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="FilterableRadGrid1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManagerProxy> <telerik:RadGrid ID="FilterableRadGrid1" Width="97%" runat="server" GridLines="None" AllowFilteringByColumn="True" AutoGenerateColumns="False"> <MasterTableView AllowFilteringByColumn="true" TableLayout="Fixed"> <Columns> <telerik:GridBoundColumn DataField="Created" HeaderText="Created" UniqueName="column" AllowFiltering="true"> </telerik:GridBoundColumn> <cc1:SICustomFilteringDropListColumn FilterControlWidth="180px" HeaderText="Created By" FilterField="CreatedBy.ID" DataField="CreatedBy.ID"> <ItemTemplate> <asp:Label ID="lblCreatedBy" runat="server"><%# Eval("CreatedBy.ID")%></asp:Label> </ItemTemplate> </cc1:SICustomFilteringDropListColumn> </Columns> </MasterTableView> </telerik:RadGrid> </div> </form>I'm sure I'm missing something simple. Thank you for your help.
Sean M. Severson