Hello, I followed the example from Josh Smith to put CheckBoxes in record selectors in a grid. However, now there are checkboxes in the child records in the hierarchical view, as well as the child record headers. I do not want checkboxes for these child records, only the parent level records.
Is there a way I can only add the checkboxes for the top level records?
Currently I am adding the comboboxes using the Template property in igDP:RecordSelector and igDP:HeaderPrefixArea.
<
...
</
Hello,
To have checkboxes only on the first layout ( and not on the child records ), you have to :
1) give a x:key to the Style of the RecordSelector.
2) set the RecordSelectorStyle property of the layout ( in this case 0 ) to that style (with the key)
For example:
<Style x:Key="recordSelectorCheckBoxStyle" TargetType="{x:Type igDP:RecordSelector}"> <Setter Property="Template">
....
and then
xamDataGrid1.FieldLayouts[0].Settings.RecordSelectorStyle = FindResource("recordSelectorCheckBoxStyle") as Style;
Hope this helps.
Alex.
Hi Alex,
Thanks for the quick reply.
I was able to find the property to set in Xaml using the code you wrote. I put my style I created here and it worked as I wanted it.
<igDP:XamDataPresenter.FieldLayouts>
<igDP:FieldLayout>
Thanks for your help