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
1285
White space in header of grid
posted

I setup grid using code by setting column/row properties of the field class.  In the first row I get a white space.  I expected gray space as the last row.  Suggestions?

 

Thanks

  • 685
    posted

    Hi I am facing some issue related to header BG Color/ Hover color but i am not able to change color code of header, I am doing like this

    <Style TargetType="igDP:DataRecordPresenter" x:Key="DataRecordPresenter1">
                <Setter Property="HeaderAreaBackground" Value="#FFECE9D8">               
                </Setter>
                <Setter Property="Foreground" Value="#FFECE9D8">
                </Setter>
                <Setter Property="Background" Value="#FFECE9D8">
                </Setter>
            </Style>

     <igDP:XamDataGrid.FieldLayoutSettings >
                                    <igDP:FieldLayoutSettings AutoGenerateFields="False" 
                                            RecordSelectorLocation="None" DataRecordPresenterStyle="{StaticResource ResourceKey=DataRecordPresenter1}"
                                                              DataRecordCellAreaStyle="{StaticResource customRecordArea}"/>
                                </igDP:XamDataGrid.FieldLayoutSettings>

     

    But only color of most left column is changed but other remain same colr, plz suggest where am i doing wrong?

  • 69686
    posted

    Hello, 

    This is because the Gradient of the default theme is white in this area. You can change this by creating a style for the DataRecordPresenter and setting the HeaderAreaBackground property:

    <Style TargetType="igDP:DataRecordPresenter">

                <Setter Property="HeaderAreaBackground">

                    <Setter.Value>

                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">

                            <GradientStop Offset="0.000000" Color="#FF828796"/>

                            <GradientStop Offset="0.5" Color="Blue"/>

                            <GradientStop Offset="0.5" Color="#FF303342"/>

                            <GradientStop Offset="1.000000" Color="Yellow"/>

                        </LinearGradientBrush>

                    </Setter.Value>

                </Setter>

            </Style>

    Hope this helps