Hi there,
perhaps it is a stupid question, but I don't get it to work and I found nothing in the web.
I have a multicolumncombobox with 3 columns. I want to add a filter, which searches in all 3 columns and displays all results found in one of the 3 columns.
First I found the filterdescriptor class. That worked fine, but it displays only results, which are found in all 3 columns and not in one of them.
Then I tried to get it work with the compositefilterdescriptor. And that does not work for me. Perhaps someone has a hint. Here is my code:
Telerik.WinControls.Data.CompositeFilterDescriptor compositeDescriptor = new Telerik.WinControls.Data.CompositeFilterDescriptor();
compositeDescriptor.LogicalOperator = Telerik.WinControls.Data.FilterLogicalOperator.Or;
compositeDescriptor.FilterDescriptors.Add(new Telerik.WinControls.Data.FilterDescriptor("productNo", Telerik.WinControls.Data.FilterOperator.Contains, cbo_ProductMultiColumn.Text.ToString()));
compositeDescriptor.FilterDescriptors.Add(new Telerik.WinControls.Data.FilterDescriptor("productSearchName", Telerik.WinControls.Data.FilterOperator.Contains, cbo_ProductMultiColumn.Text.ToString()));
compositeDescriptor.FilterDescriptors.Add(new Telerik.WinControls.Data.FilterDescriptor("productName", Telerik.WinControls.Data.FilterOperator.Contains, cbo_ProductMultiColumn.Text.ToString()));
compositeDescriptor.IsFilterEditor = true;
this.cbo_ProductMultiColumn.EditorControl.FilterDescriptors.Add(compositeDescriptor);
Sorry, if it is a stupid question. I'm still a beginner. :-)
perhaps it is a stupid question, but I don't get it to work and I found nothing in the web.
I have a multicolumncombobox with 3 columns. I want to add a filter, which searches in all 3 columns and displays all results found in one of the 3 columns.
First I found the filterdescriptor class. That worked fine, but it displays only results, which are found in all 3 columns and not in one of them.
Then I tried to get it work with the compositefilterdescriptor. And that does not work for me. Perhaps someone has a hint. Here is my code:
Telerik.WinControls.Data.CompositeFilterDescriptor compositeDescriptor = new Telerik.WinControls.Data.CompositeFilterDescriptor();
compositeDescriptor.LogicalOperator = Telerik.WinControls.Data.FilterLogicalOperator.Or;
compositeDescriptor.FilterDescriptors.Add(new Telerik.WinControls.Data.FilterDescriptor("productNo", Telerik.WinControls.Data.FilterOperator.Contains, cbo_ProductMultiColumn.Text.ToString()));
compositeDescriptor.FilterDescriptors.Add(new Telerik.WinControls.Data.FilterDescriptor("productSearchName", Telerik.WinControls.Data.FilterOperator.Contains, cbo_ProductMultiColumn.Text.ToString()));
compositeDescriptor.FilterDescriptors.Add(new Telerik.WinControls.Data.FilterDescriptor("productName", Telerik.WinControls.Data.FilterOperator.Contains, cbo_ProductMultiColumn.Text.ToString()));
compositeDescriptor.IsFilterEditor = true;
this.cbo_ProductMultiColumn.EditorControl.FilterDescriptors.Add(compositeDescriptor);
Sorry, if it is a stupid question. I'm still a beginner. :-)