Grid with Excel type filter option without additional datasource

6 posts, 0 answers
  1. Anand
    Anand avatar
    4 posts
    Member since:
    Jan 2014

    Posted 28 Aug 2014 Link to this post

    At http://blogs.telerik.com/aspnet-ajax/posts/13-11-05/add-excel-like-multi-select-filtering-to-your-asp.net-datagrid you may Q3'13 release start to provied Excel type filter with additional datasource and you also discuss your new paln in which you says that you may give Excel type filter without additional datasource.

    so is it available in latest release or not? If yes then what is the release version no & Not then in which release you may introduce this facilities? Because we are interested this functionality for our enterprise product. As we already have Infragistics having this functionality.But we want to migrate to telerik for performance and support issues.
  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 01 Sep 2014 Link to this post

    Hi Anand,

    In the current version of the controls (2014.2.724) the CheckList filter items could be populated manually or from an additional data source. In order for the CheckList filtering to be enabled you need to ensure that the FilterType property of RadGrid is set to either CheckList or Combined. The functionality is described in greater detail in the following article:
    If you would like to populate the items in the CheckList manually you need to handle the OnFilterCheckListItemsRequested event of RadGrid. In it you could define what would be the items in the CheckList. The handler would look similar to the following:

    protected void RadGrid1_FilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e)
    {
        // populate the items for the appropriate column
        if (e.Column.UniqueName == "ColumnUniqueName")
        {
            e.ListBox.Items.Add(new RadListBoxItem("Item 1"));
            e.ListBox.Items.Add(new RadListBoxItem("Item 2"));
            e.ListBox.Items.Add(new RadListBoxItem("Item 3"));
        }
        else if (e.Column.UniqueName == "OtherColumnUniqueName")
        {
            e.ListBox.Items.Add(new RadListBoxItem("Another Item 1"));
            e.ListBox.Items.Add(new RadListBoxItem("Another Item 2"));
            e.ListBox.Items.Add(new RadListBoxItem("Another Item 3"));
        }
    }

    Feel free to contact us again if you have additional queries.

    Regards,
    Viktor Tachev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. Nishant
    Nishant avatar
    1 posts
    Member since:
    Mar 2015

    Posted 03 Mar 2015 Link to this post

    How the filtering will be handled whenever user select any item from RadListBoxItem?
  4. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 05 Mar 2015 Link to this post

    Hi,

    By default the filtering will be handled automatically by RadGrid according to the Text and Value of the selected ListBox items.

    In case you would like to handle the filtering manually you can manipulate the FilterExpression like illustrated in this article.

    Regards,
    Viktor Tachev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  5. Massimo
    Massimo avatar
    3 posts
    Member since:
    Sep 2012

    Posted 08 Apr 2015 in reply to Viktor Tachev Link to this post

    hello Can you please provide an example on how to manipulate the FilterExpression with CheckList Filtering enabled?

    I need to populate the listbox with a value and a description, showing the description in the list and filtering by it's value

    thank you

     

  6. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 09 Apr 2015 Link to this post

    Hi,

    I am attaching a sample project that illustrates how you can set the FilterExpression manually. The sample illustrates how you can set a filter that is applied on initial load. However, you can use similar approach and apply the filter on another event (like Button Click).

    Regards,
    Viktor Tachev
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top