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
1255
How do I trigger a Editor Style Selector event
posted

I am converting a windows form application to wpf that allows the user to fill in a grid by clicking a cell, which opens a menu below the cell, then clicking a menu item.  After the user clicks the menu in the first column, the menu choice determines which menu appears in the second column and so on for the third column.  I have the menus running by attaching each menu as a custom editor.  Each row in the second and third columns get a unique menu using the Editor Style Selector which is working when the field layout initializes.  The last piece I need to make this all work is to be able to somehow manually cause the Editor Style Selector to run after I get a menuitem choice in a running grid.

How do I programmatically trigger an Editor Style Selector event?

  • 1255
    Suggested Answer
    Offline posted

    I figured it out with the help of priority support.

    xamDataGrid.DataSource = null;

    xamDataGrid.FieldLayouts.Clear();

    xamDataGrid.DataSource = myData;

    This reruns the FieldLayout initialized event and connects the correct menu.