How can I bind data to the add new row columns / cells. For instance I have already created a template column with a combo box in which I bind a list to. Now, how do I bind to the same column for the add new row control?
Thanks in advance for any help.
That Xaml looks reasonable you would need to bind the combo to the values you want it populated with.
I was able to get by this by making the async call in the app file before setting the control base and then adding the result set to the application resources dictionary. I then bind it to the Combo Box in the data template. Here is the code I ended up with.
<igGrid:TemplateColumn HeaderText="Absence Code" Key="ABSValue"><igGrid:TemplateColumn.ItemTemplate><DataTemplate><TextBlock Text="{Binding ABSValue}" FontSize="14"/></DataTemplate></igGrid:TemplateColumn.ItemTemplate><igGrid:TemplateColumn.EditorTemplate><DataTemplate><ComboBox x:Name="AbsCombo" ItemsSource="{StaticResource AbsRecords}" SelectionChanged="AbsCombo_SelectionChanged"><ComboBox.ItemTemplate><DataTemplate><Border BorderBrush="Azure"><StackPanel Orientation="Horizontal"Background="WhiteSmoke"><TextBlock Width="50"Text="{Binding Path=AbsCode}"VerticalAlignment="Center"FontSize="12"></TextBlock><TextBlock Width="150"Text="{Binding Path=AbsCodeRef}"VerticalAlignment="Center"FontSize="12"></TextBlock></StackPanel></Border></DataTemplate></ComboBox.ItemTemplate></ComboBox></DataTemplate></igGrid:TemplateColumn.EditorTemplate></igGrid:TemplateColumn>
I cannot seem to bind a combo box with late bound data. The combo box binds if it is not embedded in the grid. I have tried the INotifyPropertyChanged interface for the property I am binding to but I cannot seem to get that to work either. So to resolve the situation I bind all of the other rows in the same datacontract, but the addnewrow still never gets bound, because it is not directly associated with a contract record.
The AddNewRow should already be using the editor of the TemplateColumn. It should be receiving the same DataContext.
Could you give more details on what is going on?