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

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

  •  05-05-2008, 11:06 PM

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

    Hi Marcus,

    I tried the example given over there. But it failed. I have pasted the XAML of my Grid control.

     

                        <xceed:DataGridControl Margin="10" Height="350" Name="MappingGrid" Width="Auto" VerticalAlignment="Top" CellEditorDisplayConditions="MouseOverCell" ValidationMode="CellEndingEdit">                                                                  
                                <xceed:DataGridControl.View>
                                    <xceed:TableView />                                                                       
                                </xceed:DataGridControl.View>
                                <xceed:DataGridControl.Columns>
                                    <xceed:Column FieldName="sequence" Title="Sequence" ReadOnly="True" Width="60" />
                                    <xceed:Column FieldName="sample_data" Title="Sample data" ReadOnly="True" Width="150" />
                                    <xceed:Column FieldName="field_name" Title="Source Field Name" Width="150">
                                        <xceed:Column.CellValidationRules>
                                            <validation:SourceFieldValidationRule />
                                        </xceed:Column.CellValidationRules>
                                    </xceed:Column>
                                    <xceed:Column FieldName="target_info" Title="Target Field" CellContentTemplate="{StaticResource MappingStyle}" CellEditor="{StaticResource MappingEditStyle}" Width="200" />
                                    <xceed:Column FieldName="target_db" Title="Target DB" Visible="False" />
                                    <xceed:Column FieldName="target_table" Title="Target Table" Visible="False" />
                                    <xceed:Column FieldName="target_column" Title="Target Field" Visible="False" />
                                </xceed:DataGridControl.Columns>
                            </xceed:DataGridControl>

     

    I have a DataTable in the same code behind say "SourceFieldsTable". I want to bind that to the Column with FieldName = "field_name". I created a CellEditor with a ComboBox and Binded the DataTable. Its showing empty ComboBox only.


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