Hi --
I'm creating a data grid that has a column of combo boxes.
I've done the example from the Help that attaches an unbound field called "Rating" and gives the user the choice of "5 stars", "4 stars", etc.
When the data grid first appears none of the options is selected. It's just blank.
How could I set up the XAML to put a default value in this cell at startup?
Thanks
- Dave
Hi Dave,
You can try to set SelectedIndex to your XamComboEditor style :
<igDP:UnboundField Name="rating" Label="Rating">
<igDP:Field.Settings>
<igDP:FieldSettings EditorType="{x:Type igEditors:XamComboEditor}">
<igDP:FieldSettings.EditorStyle>
<Style TargetType="{x:Type igEditors:XamComboEditor}">
<Setter Property="ItemsProvider" Value="{StaticResource cbipRatings}" />
<Setter Property="SelectedIndex" Value="3" />
</Style>
</igDP:FieldSettings.EditorStyle>
</igDP:FieldSettings>
</igDP:Field.Settings></igDP:UnboundField>
Regards
Vlad
Thanks Vlad. That worked!