Home Forums WPF controls Xceed DataGrid for WPF Empty header in ComboBox in a custom editor

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #26075 |

    I have a ComboBox as a custom editor for one of my types. It works fine except the ComboBox doesn’t have a selected item when it is being displayed in the first time. When I choose one of values in a dropdown list and enter in edit mode of that property next time it works just fine. How do I make ComboBox to have a selected item in the first time? Here’s the code:

    <xcdg:CellEditor x:Key=”{x:Type Entities:Country}”>
    <xcdg:CellEditor.EditTemplate>
    <DataTemplate>
    <ComboBox ItemsSource=”{Binding Source={StaticResource CountriesList}}”
    DisplayMemberPath=”Alias”
    SelectedItem=”{xcdg:CellEditorBinding}”
    />
    </DataTemplate>
    </xcdg:CellEditor.EditTemplate>
    </xcdg:CellEditor>

    Imported from legacy forums. Posted by Alexander (had 1837 views)

    User (Old forums)
    Member
    Post count: 23064

    I’ve noticed it happens only if an ItemsSource property of the ComboBox is bound to a CslaDataProvider. It works fine with any other sources.

    Imported from legacy forums. Posted by Alexander (had 2962 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.