Add custom DropDown to RadFilter

2 posts, 0 answers
  1. Chamara
    Chamara avatar
    37 posts
    Member since:
    Jun 2011

    Posted 14 Mar 2012 Link to this post

    i'm trying to add a RadFilter to filter my RadGrid which has several coulmns.it works fine. now i need to add a dropdown only for a one column filter.i have a column named  Revision in my RadGrid.i'm trying the following but it doesn't work

       <telerik:RadFilter runat="server" ID="RadFilter1" 
                    FilterContainerID="gridSearchL3" ShowApplyButton="true" Height="100px" >
                    <FieldEditors>
                    <custom:RadFilterDropDownEditor DataValueField="Revision" DataTextField="Revision" DataType="System.String" FieldName="Revision" />
           
                    </FieldEditors>
                    </telerik:RadFilter>

    i'm getting the error " Object reference not set to an instance of an object"
    for creating custom dropdown i've used following class

    http://www.telerik.com/help/aspnet-ajax/filter-custom-editors.html 

  2. Tsvetina
    Admin
    Tsvetina avatar
    1873 posts

    Posted 19 Mar 2012 Link to this post

    Hi Chamara,

    Can you confirm that you have assigned the custom class in the FieldEditorCreating event?
    protected void RadFilter1_FieldEditorCreating(object sender, RadFilterFieldEditorCreatingEventArgs e)
    {
        if (e.EditorType == "RadFilterDropDownEditor")
        {
            e.Editor = new RadFilterDropDownEditor();
        }
    }

    If this is not the issue, please share your code, so we can look for any possible mistakes.

    Greetings,
    Tsvetina
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top