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

MultiColumnComboBox - Filter Business Objects

1 Answer 108 Views
MultiColumn ComboBox
This is a migrated thread and some comments may be shown as answers.
Cameron Hart
Top achievements
Rank 1
Cameron Hart asked on 08 Oct 2009, 03:42 AM
Hey there,

I'm trying to use the MultiColumnComboBox from 2009.1.9.414 to do an AutoFilter on a DataSource that is an array of Buisness Objects.

I've done this before with a DataSource that is a DataTable, and it worked fine. The exact same code is failing to work altogether for Business Objects. Without the filter, I get the full thousand-odd account items returned. With the filter, I get nothing, no matter what I search for.

Other than stepping through my array and creating the DataTable myself, is there another method for doing this?

Sample code below:

            AccountData[] data = this.GetData(); 
            this.cboSelectTaskAccount.DataSource = data; 
            // ... Set up my columns 
            if (this.cboSelectTaskAccount.EditorControl.MasterGridViewTemplate.FilterExpressions.Count < 1) 
                FilterExpression filter = new FilterExpression( 
                filter.Parameters.Add(GridFilterCellElement.ParameterName, true); 

I'm hoping there's a fix for this in 2009.1.9.414, as the cost for refactoring to the latest version would be quite steep right now.

Thanks for your time.

1 Answer, 1 is accepted

Sort by
Julian Benkov
Telerik team
answered on 13 Oct 2009, 11:24 AM
Hello Cameron Hart,

To enable filtering in RadGridView after setting your columns, use the following code snippet:

this.cboSelectTaskAccount.EditorControl.EnableFiltering = true;

You can directly assign your data to the DataSource property, but for full support of synchronization your business object must implement IBindingList interface and return items like IList object, not like array.

this.cboSelectTaskAccount.DataSource = this.GetData();

Best wishes,
Julian Benkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
MultiColumn ComboBox
Asked by
Cameron Hart
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question