Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
515
Adding XamComboEditor in XamGrid
posted

Hi,

I am trying to add XamComboEditor to a XamGrid column.

I want to set the ItemSource of this XamComboEditor via code, it is dynamic and it'll keep changing means I'll change the itemsource to other collection as well.

Want to allow user to either select from existing, or let Enter new value in the cell.

I used below code to get the xamcomboeditor in my grid:

                <ig:TemplateColumn Key="Band" IsReadOnly="False">
                    <ig:TemplateColumn.ItemTemplate>
                        <DataTemplate>
                            <TextBlock
                                x:Name="DisplayName"
                                Text="{Binding}" />
                        </DataTemplate>
                    </ig:TemplateColumn.ItemTemplate>
                    <ig:TemplateColumn.EditorTemplate>
                        <DataTemplate>
                            <ig:XamComboEditor  
                                IsEditable="True"
                                CustomValueEnteredAction="Add"
                                    ItemsSource="{Binding}"
                                    SelectedItem="{Binding}">
                                <ig:XamComboEditor.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding}"/>
                                    </DataTemplate>
                                </ig:XamComboEditor.ItemTemplate>
                            </ig:XamComboEditor>
                        </DataTemplate>
                    </ig:TemplateColumn.EditorTemplate>                    
                </ig:TemplateColumn> 

I am not getting as how to set the itemsource to this column via code (at runtime)

Any suggestions/directions?

Parents Reply Children