Hello,
I've searched for a while but didn't find anything useful about it.
I've a dataset, filled with an SQL query which contains a table of many records, and a gridView with a comboboxcolumn. I try to bind my comboboxcolumn with my dataset, but it only displays the first row, in my whole column. For example, if I have 400 records, it displays 400 times the first record.
Here's my code in my .xaml :
etc, and :
And in my .cs :
Did I miss something ? And yes, I'm sure that my dataset is filled with the right values.
Thanks for your help !
I've searched for a while but didn't find anything useful about it.
I've a dataset, filled with an SQL query which contains a table of many records, and a gridView with a comboboxcolumn. I try to bind my comboboxcolumn with my dataset, but it only displays the first row, in my whole column. For example, if I have 400 records, it displays 400 times the first record.
Here's my code in my .xaml :
<telerik:RadGridView HorizontalAlignment="Left" VerticalAlignment="Top" ItemsSource="{Binding dataSetCameras}"etc, and :
<telerik:GridViewComboBoxColumn Header="Cameras" UniqueName="Camera" DataMemberBinding="{Binding reference}" DisplayMemberPath="Camera" SelectedValueMemberPath="Camera" HeaderTextAlignment="Center" EditTriggers="CellClick" Width="*"> <telerik:GridViewComboBoxColumn.ItemTemplate> <DataTemplate> <Grid> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <TextBlock Grid.ColumnSpan="2" Text="{Binding reference}" /> <StackPanel Grid.Row="1" Orientation="Horizontal"> <TextBlock Foreground="#FF356EA6" Text="{Binding sold}" /> <TextBlock Text=", " /> <TextBlock Foreground="#FF356EA6" Grid.Column="1" Text="{Binding broken}" /> <TextBlock Text=", " /> <TextBlock Foreground="#FF356EA6" Grid.Column="2" Text="{Binding stolen}" /> </StackPanel> </Grid> </DataTemplate> </telerik:GridViewComboBoxColumn.ItemTemplate>And in my .cs :
((GridViewComboBoxColumn)this.gridViewCameras.Columns["Camera"]).ItemsSource = datas.dataSetCameras.Tables;Did I miss something ? And yes, I'm sure that my dataset is filled with the right values.
Thanks for your help !