I still do not know how I can set a style for only once and not for each cell. In your example you set the style for the StudentMarks column in lines 8 to 12, how can i use the same style for all other colums (StudentId,StudentName ..) or in an other Datagrid without repaeat the style for each column? , I know this example including a Value Converter makes no sence, but to set the Font and / or fontsize for all sfDataGridds in the whole Application will be a big benefit
Wolfgang
|
<Application.Resources>
<ResourceDictionary>
<Style x:Key="GridCellStyle" TargetType="sfgrid:GridCell">
<Setter Property="BackgroundColor" Value="Yellow" />
<Setter Property="Foreground" Value="Green" />
</Style>
</ResourceDictionary>
</Application.Resources>
<sfgrid:GridTextColumn HeaderText="Order ID" MappingName="OrderID"
CellTextSize="20"
CellStyle="{StaticResource GridCellStyle}">
</sfgrid:GridTextColumn> |
I understand I'm reviving an old thread, but I figured it was better than posting the same question in a new thread.
We use SfDataGrid throughout our application on multiple pages where each data grid can have many columns. It's incredibly verbose to need to define the CellStyle explicitly when the CellStyle itself is a bindable property and could benefit from an implict style at the Application level rather than the page level.
Please reconsider requiring developers to explicitly set CellStyle and allow implicit styles to set the CellStyle property.