This is a migrated thread and some comments may be shown as answers.
TableFilteringRow CheckBox
3 Answers 21 Views
This is a migrated thread and some comments may be shown as answers.
Dominik
Top achievements
Rank 1
Dominik asked on 05 Jun 2013, 09:11 AM
Hi,

I can set filltering for GridViewTextBoxColumn:
dg.MasterView.TableFilteringRow.Cells[1].Value = "test";
Unfortunately this does not work similarly for GridViewCheckBoxColumn:
dg.MasterView.TableFilteringRow.Cells[2].Value = true;

Version: 2013.1.321.40

3 Answers, 1 is accepted

Sort by
0
Accepted
Anton
Telerik team
answered on 10 Jun 2013, 10:16 AM
Hi Dominik,

Thank you for writing.

The correct way to set filter is by creating FilterDescriptor, not by directly setting the cell value. Consider the following example:
FilterDescriptor filter = new FilterDescriptor();
filter.PropertyName = "column2";
filter.Operator = FilterOperator.IsEqualTo;
filter.Value = true;
filter.IsFilterEditor = true;
this.radGridView1.FilterDescriptors.Add(filter);

You can read more about FilterDescriptor in our online documentation: http://www.telerik.com/help/winforms/gridview-filtering-setting-filters-programmatically-simple-descriptors.html

I hope this helps.

Regards,
Anton
Telerik
RadChart for WinForms is obsolete. Now what?
0
Dominik
Top achievements
Rank 1
answered on 20 Jun 2013, 11:47 AM
The solution works fine but I had some problems with it.
I was convinced that PropertyName = FieldName.
This information I found in an example given: FilterDescriptor - implements filtering property (field) name. <- column1.FieldName?
For this reason, when an earlier attempt to use this approach has not got any results.
It turns out that the PropertyName = Name of column.

// not this
column1.FieldName = "sqlcol1";
 
//or this
column1.HeaderText = "header test";
 
//but this one
column1.Name = "column1";

I think PropertyName is a little confusing, at least for me.
0
Accepted
Anton
Telerik team
answered on 25 Jun 2013, 10:20 AM
Hi Dominik,

Thank you for writing back.

We highly appreciate your feedback and we will consider it in a future version.

Should you have any other questions, I will be glad to assist you.

Regards,
Anton
Telerik
RadChart for WinForms is obsolete. Now what?
Asked by
Dominik
Top achievements
Rank 1
Answers by
Anton
Telerik team
Dominik
Top achievements
Rank 1
Share this question
or