This is a migrated thread and some comments may be shown as answers.

RadgridView and Filterdescription for column

2 Answers 20 Views
GridView
This is a migrated thread and some comments may be shown as answers.
W
Top achievements
Rank 1
W asked on 01 Sep 2016, 02:09 PM

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 Answers, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 02 Sep 2016, 11:27 AM
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.
0
W
Top achievements
Rank 1
answered on 02 Sep 2016, 11:48 AM

Hi,

 

this worked 100%. Thanks!

Tags
GridView
Asked by
W
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
W
Top achievements
Rank 1
Share this question
or