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
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.