Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
25
Removing checkbox in child records
posted

 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.

 

<Style TargetType="{x:Type igDP:RecordSelector}" BasedOn="{x:Null}">

<Setter Property="Template">

...

</Style>

 

Parents
  • 69686
    posted

     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. 

     

Reply Children
No Data