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

Filter GridViewComboBoxColumn based on another cell

1 Answer 55 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Marc Roussel
Top achievements
Rank 2
Marc Roussel asked on 18 Dec 2013, 06:48 PM


I'm trying to filter a ComboBox when the user enter something in another cell.  When I debug I see that the GridviewComboBoxColumn is well filtered but  in reality it isn't.



Where do I put my code in order to filter the combobox.  I tought adding my code in PreparingCellForEdit would work but it's not.

Is there any other event I can get in order to achieve that ?

1 Answer, 1 is accepted

Sort by
0
Marc Roussel
Top achievements
Rank 2
answered on 18 Dec 2013, 06:55 PM

Ah I found out.  I had to use the e.EditingElement and not the e.Column


The following code works :



RadComboBox rcb = e.EditingElement as RadComboBox;
rcb.ItemsSource = _ExpenseTypes.Where(et => et.id == 103 || et.id == 104).OrderBy(a => (Gear.IsFrench ? a.FR_Name : a.EN_Name));


Tags
GridView
Asked by
Marc Roussel
Top achievements
Rank 2
Answers by
Marc Roussel
Top achievements
Rank 2
Share this question
or