RadgridView and Filterdescription for column

3 posts, 0 answers
  1. W
    W avatar
    17 posts
    Member since:
    Aug 2014

    Posted 01 Sep 2016 Link to this post


    I would like to know if there is a property to get the column filter back in text format.

    for example if I set the filter to filter on city something like

    Dim S =gridview.columns("city").GetFilterDescription

    's contains " city = 'berlin' "

    otherwise I have to create the text from scratch.....

  2. Dilyan Traykov
    Dilyan Traykov avatar
    1158 posts

    Posted 02 Sep 2016 Link to this post


    I'm afraid that there's no such property available, but you should be able to create the filter string with the properties of the columns' ColumnFilterDescriptor.FieldFilter:

    var filter1Value = this.clubsGrid.Columns[1].ColumnFilterDescriptor.FieldFilter.Filter1.Value;
    var filter1Operator = this.clubsGrid.Columns[1].ColumnFilterDescriptor.FieldFilter.Filter1.Operator;
    var logicalOperator = this.clubsGrid.Columns[1].ColumnFilterDescriptor.FieldFilter.LogicalOperator.ToString();
    var filter2Value = this.clubsGrid.Columns[1].ColumnFilterDescriptor.FieldFilter.Filter2.Value;
    var filter2Operator = this.clubsGrid.Columns[1].ColumnFilterDescriptor.FieldFilter.Filter2.Operator;
    var filterString = $"{filter1Operator} {filter1Value} {logicalOperator} {filter2Operator} {filter2Value}";

    Please let me know if this would work for you.

    Dilyan Traykov
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. W
    W avatar
    17 posts
    Member since:
    Aug 2014

    Posted 02 Sep 2016 in reply to Dilyan Traykov Link to this post



    this worked 100%. Thanks!

Back to Top