RadgridView and Filterdescription for column

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

    Posted 01 Sep Link to this post

    Hi,

    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
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 02 Sep Link to this post

    Hello,

    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.

    Regards,
    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. UI for WPF is Visual Studio 2017 Ready
  4. W
    W avatar
    17 posts
    Member since:
    Aug 2014

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

    Hi,

     

    this worked 100%. Thanks!

Back to Top