Change Column Filter options to match overridden values?

2 posts, 0 answers
  1. Chris
    Chris avatar
    4 posts
    Member since:
    Jan 2020

    Posted 21 Jan 2020 Link to this post

    I have a GridBoundColumn in my RadGrid that displays a true or false value. In the database, this is stored as a 1 or a 0. During the ItemDataBound event, I check the incoming value for this column and override it to either be the string "TRUE" or the string "FALSE". However, the RadGrid is still identifying the column's datatype as an integer so the filter menu doesn't have certain filtering options like "Contains". I tried to manually set the DataType to "System.String" on both the column itself and during the ItemDataBound event and, while this provides me the filter menu I want, the functions inside don't work (clicking "contains", for example, does nothing at all). 


    Is there anyway for me to force the filter options to match the values after DataBound?



  2. Eyup
    Eyup avatar
    4046 posts

    Posted 24 Jan 2020 Link to this post

    Hi Chris,


    You can achieve this requirement by manually changing the filter value during the ItemCommand event handler:

    The property is called column.CurrentFilterValue.

    Feel free to give it a try and let me know how it goes.


    Progress Telerik

    Get quickly onboarded and successful with UI for ASP.NET AJAX with the Virtual Classroom technical trainings, available to all active customers. Learn More.
Back to Top