Individual filtering and sorting for "sub-columns" in template column

Thread is closed for posting
3 posts, 0 answers
  1. Telerik Admin
    Telerik Admin avatar
    1679 posts
    Member since:
    Oct 2004

    Posted 16 Nov 2006 Link to this post

    Requirements

    RadGrid for ASP .NET version

    RadControls for ASP .NET AJAX version

    4.x and later


    2008.1.415 and later

    .NET version

    2.0 and later

    Visual Studio version

    2005 and later

    Programming language

    VB.NET

    Browser support

    all supported by RadGrid for ASP .NET


    all browsers supported by RadControls for ASP .NET AJAX



    PROJECT DESCRIPTION

    This example presents how to perform individual sorting and filtering for sub-columns in template column (with multi-header appearance). The main points are listed below:

    Filtering
    1. Create custom filtering column with number of DataFields matching the count of the subcolumns. These data fields are needed to pass the data to and from the filter box in the column header (more info about how to design your own template column you can find here).
    2. Save the string sequence from the filter pattern in a Session variable (separating the parts of that pattern by commas for example)
    3. Split the parts of the filter pattern and modify the FilterExpression to perform proper filter action. Clear the Session variable and the FilterExpression if the filter command is NoFilter.

    Sorting

    1. Nest two buttons in the header template with appropriate CommandName and CommandArgument property values (see this topic from the documentation for more info)
    2. Handle the sort command in the ItemCommand handler of the grid, find the custom template column in the grid and set its SortExpression property to be equal to the e.CommandArgument value.

    You can extend the example for any number of sub-columns inside the same template column.

    Note: Refer to the examples attached to the last post for most recently updated demo versions

  2. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 27 Aug 2007 Link to this post

    Hello guys,

    I am attaching ASP.NET 2.0 version of the project to this thread. It is also written in VB.NET, however for all interested - you can easily convert the code using our free online converter.

    Best regards,
    Stephen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 22 Nov 2007 Link to this post

    Hi again,

    We are posting another version of the project which illustrates how to perform individual filtering for each sub-column using dropdown lists as filters. The main logic resides inside the ItemCreated/ItemDataBound handlers of the grid and the SelectedIndexChanged handlers of the filter comboboxes.

    Best regards,
    Stephen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top