Welcome to the Xceed Community Sign in | Join | Help
Community Search  

Re: How to bind a DataTable to a ComboBox in WPF DataGrid?

  •  05-08-2008, 10:42 PM

    Re: How to bind a DataTable to a ComboBox in WPF DataGrid?

    Hi Jenny,

    See the below which is the CellEditor I used before for the ComboBox which is not working.

    <xceed:CellEditor x:Key="SourceFieldEditStyle">
                <xceed:CellEditor.EditTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" AllowDrop="True">
                            <ComboBox ItemsSource="{Binding dataMapFields}" DisplayMemberPath="field_name" SelectedValuePath="field_name" HorizontalAlignment="Stretch"/>
                    </StackPanel>
                    </DataTemplate>
                </xceed:CellEditor.EditTemplate>
            </xceed:CellEditor>

     

    This CellEditor is used for the Column with FieldName "field_name". Here "dataMapFields" is the DataTable in the codebehind. I hope this details would help to debug my problem.

     
    If possible give me a sample code that will load DataTable to a ComboBox in a DataGridControl. The filling up of the DataTable should be dynamic and code should not be in App Context.

     

    Thanks
     


    Venkatesh Mookkan
View Complete Thread
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.