Filter GridViewComboBoxColumn based on another cell

2 posts, 0 answers
  1. Marc Roussel
    Marc Roussel avatar
    429 posts
    Member since:
    Dec 2009

    Posted 18 Dec 2013 Link to this post


    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 ?

  2. Marc Roussel
    Marc Roussel avatar
    429 posts
    Member since:
    Dec 2009

    Posted 18 Dec 2013 Link to this post

    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));


  3. DevCraft banner
Back to Top