0

I just started using ComponentOne. Among other things, I need DataGrid with filtering capability for my WPF Caliburn.Micro application. So I tried to replace my common DataGrid with C1DataGrid, then C1FlexGrid, but in both cases the DataGrid was empty. Here is my code:

      <c1:C1FlexGrid x:Name="EnrollmentFiles" Grid.Row="1"
            AutoGenerateColumns="False"
            BaseControls:DataGridExtension.Columns="{Binding EnrollmentFileColumns}"
            IsReadOnly="True"
            SelectedItem="{Binding Path=SelectedEnrollmentFile, Mode=TwoWay}">
    </c1:C1FlexGrid>

Could you please tell me what I am missing? Also, should I use C1DataGrid or FlexGrid?

Thanks

David Shochet
  • 5,035
  • 11
  • 57
  • 105

1 Answers1

0

It's possible that by having SelectedItem bound the convention isn't working. If you're using the convention and want ItemsSource bound to EnrollmentFiles and you want to use SelectedItem, then create a property called SelectedEnrollmentFile and CM will do the SelectedItem binding too.

Derek Beattie
  • 9,429
  • 4
  • 30
  • 44
  • But I do have this property. Also, my problem is not even with selecting, but with populating the DataGrid. I even tried to specify ItemsSource explicitly, binding it to EnrollmentFiles collection, but the DataGrid is still empty. – David Shochet Aug 03 '12 at 14:09
  • I think it is BaseControls:DataGridExtension.Columns="{binding EnrollmentFileColumns}" that is not working. It is the way I specified and formatted columns for DataGrid. I wonder if there is a way to do the same for FlexGrid... – David Shochet Aug 06 '12 at 19:30