Hi,
I select several lines in my grid and "xdgMedias.SelectedItems.Records.Count" is = 0 !!
Is it normal ?
I would like to know the number of selected records !
My grid definition :
<igDP:XamDataGrid x:Name="xdgMedias" Grid.Row="2" DataSource="{Binding Source={StaticResource MusicViewContentDataSource}}" Background="#FF4F4D4C" OverridesDefaultStyle="False" IsGroupByAreaExpanded="False" IsNestedDataDisplayEnabled="True" GroupByAreaLocation="None"> <igDP:XamDataGrid.FieldLayouts> <igDP:FieldLayout> <igDP:FieldLayout.Settings> <igDP:FieldLayoutSettings HighlightAlternateRecords="True" SelectionTypeRecord="Extended" SelectionTypeField="None" SelectionTypeCell="None" AutoGenerateFields="False"/> </igDP:FieldLayout.Settings> <igDP:FieldLayout.Fields>
Try this,
<igDP:XamDataGrid.FieldSettings> <igDP:FieldSettings CellClickAction="SelectRecord"/></igDP:XamDataGrid.FieldSettings>
Okay,
I have find... I have to convert to a "DataRecord" !!! :-)
Thanks for your help
Thanks Joe,
I use the last Build (7.2). I have also create a sample and it work fine.
I have find the problem... it is because the "class" that I bind to the xamDataGrid has Read-Write properties...
Then, it does not handle the "double click" event on cells :-)
Once I have this... how can I get the "binded" data... I have try :
Music music = xdgMedias.SelectedItems.Records[0].DataPresenter.DataContext as Music
But it is null !
Thanks