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
645
Foreground color of rwo in xamDataGrid
posted

Hi There,

I am having issue with changing foreground color in Grid. Here is the partial code,

=====================================================================

<igDP:XamDataGrid Name="_dataGrid" Grid.Row="1" DataSource="{Binding}" Theme="[Current]">    
    <igDP:XamDataGrid.Resources>
        <local:OrderTypeConvertor x:Key="orderTypeConvertor"/>

              <Style TargetType="{x:Type igDP:DataRecordPresenter}">
                       <Setter Property="Foreground" Value="White" />
                        <Setter Property="Background"  Value="{Binding Path=Cells[Quantity].Value, Converter={StaticResource orderTypeConvertor}}" />   
            </Style>


    </igDP:XamDataGrid.Resources>

    <igDP:XamDataGrid.FieldLayoutSettings>
        <igDP:FieldLayoutSettings AutoGenerateFields="False"   AllowDelete="False" HighlightAlternateRecords="False" />
    </igDP:XamDataGrid.FieldLayoutSettings>

    <igDP:XamDataGrid.FieldLayouts>
        <igDP:FieldLayout>   
            <igDP:FieldLayout.Fields>
                <igDP:Field Name="UserId" Label="UserId" Width="60" />
                ................
                <igDP:Field Name="Quantity" Label="Quantity" Width="70" />
                .................
                <igDP:Field Name="ApplicationId" Label="ApplicationId" Width="100" />
                ..............
                ..............
            </igDP:FieldLayout.Fields>
        </igDP:FieldLayout>
    </igDP:XamDataGrid.FieldLayouts>
</igDP:XamDataGrid>

===========================================================

It does change background color, but not foreground color. I just want to set foreground (text) color to wrhite instead of default, which is black.

I'm sure I must be missing something simple.

Please let me know.

Thanking in advance for your help.