Suggestive Filter Column

Thread is closed for posting
2 posts, 0 answers
  1. EC634FF2-B63F-4204-93FA-7AEC155861BC
    EC634FF2-B63F-4204-93FA-7AEC155861BC avatar
    2 posts
    Member since:
    Sep 2012

    Posted 08 Aug 2008 Link to this post

    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

  2. C7498A83-7E2E-418C-8791-93EF573A7569
    C7498A83-7E2E-418C-8791-93EF573A7569 avatar
    9934 posts
    Member since:
    Nov 2016

    Posted 03 Sep 2008 Link to this post

    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.
Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.