The Header Text is not showing!

Dear Support

Any idea why the header text is not showing?


<syncfusion:SfDataGrid x:Name="EmployeeDataGrid" Margin="2"
Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2"
AutoGenerateColumns="False" AllowFiltering="True"
ColumnSizer="SizeToHeader"
SelectionMode="Extended"
ItemsSource="{Binding Employees}">
<syncfusion:SfDataGrid.Columns>
<syncfusion:GridTextColumn HeaderText="Name" MappingName="FullName" />
<syncfusion:GridTextColumn HeaderText="Department" MappingName="Department" />
<syncfusion:GridTextColumn HeaderText="Manager" MappingName="Manager.FullName" />
<syncfusion:GridTextColumn HeaderText="Position" MappingName="Position" />
<syncfusion:GridCheckBoxColumn HeaderText="Is Manager" MappingName="IsManager" />
</syncfusion:SfDataGrid.Columns>
</syncfusion:SfDataGrid>

3 Replies 1 reply marked as answer

FP Farjana Parveen Ayubb Syncfusion Team December 28, 2020 08:16 AM UTC

Hi Patrick, 
 
Thank you for using Syncfusion controls. 
 
We have analyzed your code snippet and image, by default header text is appear in SfDataGrid. We suspect that you have override the HeaderCellControl style in your application. Could you please share that code that will help us to provide the solution. 
 
Regards, 
Farjana Parveen A 



PA Patrick December 29, 2020 05:41 AM UTC

Dear Support

In the meanwhile after a long process, I have found the rootcase. I have a global style for the "Border" element. As soon I deleted this style, the headers do appear. Here was the code I deleted in App.xaml:
<Style TargetType="Border">
<Setter Property="Background" Value="GhostWhite" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="Gainsboro" />
</Style>
I guess the control inherits a sub control from border and does not overwrite this property. May be it is something you should take in your issue tracker.

br
Patrick Rainer




DM Dhanasekar Mohanraj Syncfusion Team December 30, 2020 08:44 AM UTC

Hi Patrik, 

Thank you for your response. 

We have checked the reported issue based on provided information’s, In SfDataGrid HeaderText’s  are rendered through Border control that’s why the HeaderText’s are not showing. 
 
Please let us know if you have any other queries. 

Regards, 
Dhanasekar Mohanraj. 


Marked as answer
Loader.
Up arrow icon