Home Forums WPF controls Xceed DataGrid for WPF Dynamic Edit ComboBox

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

    Hi,

    <xcdg:CellEditor x:Key=”categoryEditor”>
    <xcdg:CellEditor.EditTemplate>
    <DataTemplate>
    <ComboBox BorderThickness=”0″ x:Name=”cmbFieldName” Background=”Transparent”
    Foreground=”{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(TextElement.Foreground)}”
    MinHeight=”22″
    VerticalContentAlignment=”Top”
    IsEditable=”True”
    SelectedValue=”{xcdg:CellEditorBinding}”>
    <ComboBox.Resources>
    <Style TargetType=”Popup”>
    <Setter Property=”TextElement.Foreground”
    Value=”Black” />
    </Style>
    </ComboBox.Resources>
    </ComboBox>
    </DataTemplate>
    </xcdg:CellEditor.EditTemplate>
    </xcdg:CellEditor>

    i want to add items to the Combobox from code behind (i.e) Dynamically.

    is there any way to add columns dynamically.

    Imported from legacy forums. Posted by rajendernag (had 2432 views)

    Xceed Support
    Member
    Post count: 5658

    You could place a handler on the Loaded event of the ComboBox and populate the Items collection of the ComboBox in the hander.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 2701 views)

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