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

[Solved] Setting a column filter from the code-behind!

1 Answer 62 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ozgur
Top achievements
Rank 1
Ozgur asked on 19 Aug 2009, 01:45 AM
How can i set column filter from the code-behind?

I've used this code but it is not work

FieldFilterDescription filterDescriptionCategory = new FieldFilterDescription();
 filterDescriptionCategory.FieldName = "Category";
 filterDescriptionCategory.DistinctValues.Add(new FilterDescriptor("Category", FilterOperator.IsEqualTo, "ABC"));
 filterDescriptionCategory.DistinctValues.Add(new FilterDescriptor("Category", FilterOperator.IsEqualTo, "DEF"));

 filterDescriptionCategory.SelectedValues.Add(filterDescriptionCategory.DistinctValues[0]);

 this.radGridView1.FilterDescription = filterDescriptionCategory;

1 Answer, 1 is accepted

Sort by
0
Ozgur
Top achievements
Rank 1
answered on 19 Aug 2009, 09:47 AM
:)
I've solved

I've used this code;

this.myGrid.FilterDescriptors.Add(new FilterDescriptor("Group", FilterOperator.IsEqualTo, "Asus"));

Thanks,

Tags
GridView
Asked by
Ozgur
Top achievements
Rank 1
Answers by
Ozgur
Top achievements
Rank 1
Share this question
or