Home Forums WPF controls Xceed DataGrid for WPF Color the Single Column

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #25199 |

    hi

    How to set background color of the single Column in Xceed data Grid Control

    Regards
    Malli

    Imported from legacy forums. Posted by Malleswararao (had 2240 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi,

    Simply use a DataTemplate.

    In your resource:
    <DataTemplate x:Key=”redColumn”>
    <TextBlock Text=”{Binding}” Background=”Red” />
    </DataTemplate>

    In your DataGridControl:
    <xcdg:DataGridControl.Columns>
    <xcdg:Column FieldName=”My Red Column” CellContentTemplate=”{StaticResource redColumn}” />
    </xcdg:DataGridControl.Columns>

    Imported from legacy forums. Posted by Cyber Sinh (had 335 views)

    User (Old forums)
    Member
    Post count: 23064

    hi

    The above code Coloring the Individual columns.
    now i want background color of the column[0] .

    Regards
    Malli

    Imported from legacy forums. Posted by Malleswararao (had 3472 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.