Telerik
Skip Navigation LinksHome / Community / Code Library / ASP.NET and ASP.NET AJAX > Grid > Suggestive Filter Column

Not answered Suggestive Filter Column

Feed from this thread
  • Jeff Miller avatar

    Posted on Aug 8, 2008 (permalink)

    Requirements

    RadControls version

    3.5
    .NET version

    3.5
    Visual Studio version

    2008
    programming language

    C#
    browser support

    all browsers supported by RadControls


     
    PROJECT DESCRIPTION
    This is an extension to the (ID#696) "Google suggest" style filtering in RadGrid filter example.  This project uses ideas from the aforementioned example heavily but puts the relative code in a custom column type inherited from the GridBoundColumn.

    To implement you:
    1. Create a new class that inherits from the GridBoundColumn
    2. Create a viewstate string array to contain any distinct string values for the column.
    3. Override the SetupFilterControls, SetCurrentFilterValueToControl, GetCurrentFilterValueFromControl methods replacing the normal filter textbox with the radComboBox just as in the previous example, with the addition of wiring up the OnDataBound for the owner
    4. In the Owner's DataBound, loop through the datasource and look for the property on the object that is the Datafield of the column, or loop through a datatable's column of the same name and add any values you do not already have to the distinct string alue array.
    5. In the ComboBox ItemsRequested we bind it to the distinct values for the colum.
    6. For ease of clearing the filter, you may add a "Clear" button that would clear the column's filter by setting the ComboxBox.Text to empty string and clearing the CurrentFilterValue and CurrentFilterFunction properties

    Reply

  • Telerik Admin admin's avatar

    Posted on Sep 3, 2008 (permalink)

    Hello Jeff,

    Thank you for submitting this custom version of the online demo in the code library section on our site - we really appreciate your involvement and updated your Telerik points for that.

    Best regards,
    Stephen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

Back to Top

Skip Navigation LinksHome / Community / Code Library / ASP.NET and ASP.NET AJAX > Grid > Suggestive Filter Column

Powered by Sitefinity ASP.NET CMS

Contact Us | Site Feedback | Terms of Use | Privacy Policy
Copyright © 2002-2010 Telerik. All rights reserved.