Hi I am using devExpress on winform. I have a list of items wholeList = {Item1, Item2, Item3, Item4,Item5,Item6}, and I have another two lists: ActionAList = {Item1, Item3, Item5}, ActionBList = {Item2, Item4, Item6}. I have a grid view on my form. And I have two columns "Action" and "Item" on this grid. Each column has a repositoryItemComboBox as in-place editor.
In the dropdown of "Action", I have "ActionA" and "ActionB". In the dropdown of "Item", I have all the 6 items Item1 to Item6. When I select ActionA, I want Item dropdown only displays Item1, Item3, and Item5. The same when I select ActionB, I want Item dropdown only displays Item2, Item4 and Item6.
I think when user selects different Action (either A or B), I can clear the repositoryItems in Item dropdown, and add either ActionAList or ActionBList back to repositoryItem. But I feel uncomfortable, because it is possible at this point of time, the available items in Item dropdown are only Item1,3 and 5, but another row may still keep ActionB and Item2.
I wonder what would be the best way to archive this requirement. I also think of whether we have any method to hide some items in the whole list. So when the user open the editor of Item dropdown. According to the current row's action value, I may just display items in ActionAList or in ActionBList. But I am not able to find such property when I create ComboBoxItem or ImageComboBoxItem.
Thanks for any input!