I tried to set filters for the GridView but it crashes. The error is the following one :
Expression of type 'System.Object' cannot be used for parameter of type 'System.String' of method 'Boolean Contains(System.String)'
I'm not sure why, is the code wrong or something. See below, I tried adding a filter descriptor, both ways but doesn't work.
I tried the same way as setting a sort in the rows and this one works well.
Work around or sample code would be appreciated.
Thanks,
Siegfrid
Expression of type 'System.Object' cannot be used for parameter of type 'System.String' of method 'Boolean Contains(System.String)'
I'm not sure why, is the code wrong or something. See below, I tried adding a filter descriptor, both ways but doesn't work.
FilterDescriptor ofilter = new FilterDescriptor(); |
ofilter.Member = radGridView1.Columns["Type"].UniqueName; |
ofilter.Operator = FilterOperator.IsContainedIn; |
ofilter.Value = sMask.ToString(); |
radGridView1.FilterDescriptors.Add(ofilter); |
radGridView1.FilterDescriptors.Add(new FilterDescriptor("Type", FilterOperator.IsContainedIn, sMask)); |
I tried the same way as setting a sort in the rows and this one works well.
SortDescriptor descriptor = new SortDescriptor(); |
descriptor.Member = "Type"; |
descriptor.SortDirection = ListSortDirection.Ascending; |
radGridView1.SortDescriptors.Add(descriptor); |
Work around or sample code would be appreciated.
Thanks,
Siegfrid