Hi,
I am new to use Infragistics controls m facing problem during adding checkbox column in XamGrid. It gives me folloing error;
A column has been added with an Empty key. All columns must have a unique key.
Here is my code;
<ig:XamGrid Grid.Row="1" Name="dgCustomer" ItemsSource="{Binding CustomerCollection}" Height="Auto" AutoGenerateColumns="True" Width
="685">
<ig:XamGrid.Columns>
<ig:TemplateColumn>
<ig:TemplateColumn.AddNewRowEditorTemplate>
<DataTemplate>
<CheckBox x:Name="SelectBranch" IsChecked="{Binding IsSelected,Mode=TwoWay}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DataTemplate>
</ig:TemplateColumn.AddNewRowEditorTemplate>
</ig:TemplateColumn>
</ig:XamGrid.Columns>
</ig:XamGrid>
please help me out waiting for your quick reply
Hi itskashif,
you're getting this exception because you haven't set the Key property for the TemplateColumn that you are using. Every column in XamGrid should have its Key property set.
For your particular use case you should use CheckBoxColumn instead of Template column. The xaml should look something like this:
<ig:CheckBoxColumn Key="IsSelected">
You could also take a look at this sample illustrating the use of different type of columns.
Hope this helps,
Hi Konstantin Koynov,
Problem resolved thansk for your quick reply.