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
1564
SelectionTypeCell = none -> select the cell ?!
posted

Hi,

 In the grid I have set : SelectionTypeCell = none

But when I click on a cell, it is "selected", the row is selected too but I would like to avoid cell selection but it do not work.

 Also, how can I change the color of the "selected rows" ?

 Thanks for support

  • 193
    posted

    <igDP:XamDataGrid.Resources>

    <Style TargetType="{x:Type igDP:DataRecordCellArea}">

               <!--change the color of the "selected rows"--> 

               <Setter Property="BackgroundSelected">
                            <Setter.Value>
                                <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                    <GradientStop Color="LightSalmon" Offset="0"/>
                                    <GradientStop Color="White" Offset="1"/>
                                </LinearGradientBrush>
                            </Setter.Value>
                </Setter>

               <!--change the color of the "Active rows"--> 

                        <Setter Property="BackgroundActive">
                            <Setter.Value>
                                <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                    <GradientStop Color="yellow" Offset="0"/>
                                    <GradientStop Color="White" Offset="1"/>
                                </LinearGradientBrush>
                            </Setter.Value>
                        </Setter>
    </Style>

  • 8576
    Offline posted
    Hi -
     
    To select the Row (and not the cell) when a cell is clicked, set the CellClickAction on the FieldSettings object to 'SelectRecord'.  The FieldSettings object is available:
    1. On the Field vis its Settings property.  Values set here serve take precendence over values set at a higher level (i.e., on the FieldLayout or XamDataGrid)
    2. Values set here serve as defaults for all Fields in the FieldLayout unless overridden on the Field
    3. On the XamDataGrid via its FieldSettings property.  Values set here serve as defaults for all Fields in all FieldLayouts unless overridden at a lower level (i.e., on the FieldLayout or Field)
    Joe Modica