Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
800
Trying to build a context menu from the items in a combobox cell.
posted

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

I am already able to build a context menu for the checkbox cells in Grid_PreviewMouseRightButtonDown.

Now when the user has selected a range of cells and right clicks, I wish to iterate the cells and build a context menu that is filled with the combo items for the selected cells only if the selected cells are of the same combo type (meaning they contain all the same strings as choices in the combo). So then the user can select a context menu item and set all the selected combos to that value.

I don’t know how to get at the combo items collection for the selected cells to populate my context menu and test for more than one combo type being selected.

If there is a better way to create the context menu I am open to suggestions.

Parents
  • 69686
    posted

    The selected cells you can access through the SelectedItems.Cells collection. You can iterate through that collection and get their values.

Reply Children
No Data