Home Forums WPF controls Xceed DataGrid for WPF Unable to set style to Header column

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

    Hi,

    I am facing multiple issues in using Xceed WPF datagrid.

    1. Unable to set the header style. I searched in the samples also no where header style is used.
    2. If there is a dropdown Cell in a row, until we focus on the cell we can’t know whether it is a dropdown or not. Is there any way to fix the dropdown?

    Please clarify whether above two are possible or not?

    Thanks,
    Vasu

    Imported from legacy forums. Posted by vasudeva rao (had 2958 views)

    Xceed Support
    Member
    Post count: 5658

    1. Can you provide more information on what you are trying to achieve:
    – You want to change the content of the column headers?
    – You want to change what is displayed inthe Fixed Header region of the grid?

    2. You can set the CellEditorDisplayConditions property on the appropriate column to any value that fits your needs. <a href=”http://doc.xceedsoft.com/products/XceedWpfDataGrid/Xceed.Wpf.DataGrid~Xceed.Wpf.DataGrid.Column~CellEditorDisplayConditions.html”>Here is the link to the documentation on the topic </a>

    Imported from legacy forums. Posted by Marcus [Xceed] (had 309 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi Marcus,

    I want to change the Background color of column header. For example there are four columns in a grid. I want to display background color of each header to different color. Is it possible in this control?

    Thanks,
    Vasu

    Imported from legacy forums. Posted by vasudeva rao (had 468 views)

    Xceed Support
    Member
    Post count: 5658

    Simplest way to do that is to create an Implicit style for ColumnManagerCell and add triggers for the ParentColumn.FieldName…

    here is a quick example:

    <Style TargetType=”{x:Type xcdg:ColumnManagerCell}”>
    <Style.Triggers>
    <DataTrigger Binding=”{Binding RelativeSource={RelativeSource Self}, Path=ParentColumn.FieldName}”
    Value=”Title”>
    <Setter Property=”Background”
    Value=”HotPink” />
    </DataTrigger>
    <DataTrigger Binding=”{Binding RelativeSource={RelativeSource Self}, Path=ParentColumn.FieldName}”
    Value=”Album”>
    <Setter Property=”Background”
    Value=”Aquamarine” />
    </DataTrigger>
    </Style.Triggers>
    </Style>

    for more details on styling, <a href=”http://doc.xceedsoft.com/products/XceedWpfDataGrid/Styles.html”>please refer to this documentation topic</a>

    Imported from legacy forums. Posted by Marcus [Xceed] (had 3447 views)

    User (Old forums)
    Member
    Post count: 23064

    thats work perfect execpt 1 thing when the mouse over the headers or i select 1 the color changes to white !!!!!! or silver why is that ???

    thanks ….

    Imported from legacy forums. Posted by miko (had 1044 views)

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