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
570
Having a combobox editor in grid have different data source
posted

Good day all.

 

I need to do something, but I have the feeling it is not possible...

 

We have a grid with processes.  I need to change the state (defined in a code list), but the processes don't all have the same possible states.

 

Process A can change to state reject or complete

Process B can change to state Rework, blank, in progress and complete.

 

Can I change this code

<igEditors:ComboBoxItemsProvider x:Key="cbFKState" ItemsSource="{Binding Source={StaticResource odpHotworkS_State}}"
                  DisplayMemberPath="State" ValuePath="IdState">
        </igEditors:ComboBoxItemsProvider>

 

to enable it to use a different ItemSource, depending on the activeRecord?

 

Regards

Christo

Parents
No Data
Reply
  • 69686
    Verified Answer
    posted

    Hello Christo,

    You can do that. The CellValuePresenter exposes an Editor property which will return an instance of the editor in that cell. You can cast that to a XamComboEditor and then change its ItemsSource property accordingly.

    You may also find helpful our methods Infragistics.Windows.Utilities.Get(Ancestor/Descendant)From(Type/Name) to go up/down the element tree and search for elements.

Children