We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SfDataGrid standard header style and extra column bug

Hello,

I'm using the SfDataGrid control (latest version, 20.3.0.47) and I have an empty small column (1 px) that's not defined in my xaml code.

grid.png

I think this is a bug. Same behavior in the samples provided with the package.


I would like to style the header in the Windows standard way too, see image below

std.png

with the gray gradient, but I can't find any ready template for it.

A template similar to https://learn.microsoft.com/en-us/windows/communitytoolkit/controls/datagrid  would be fine too.



3 Replies 1 reply marked as answer

DM Dhanasekar Mohanraj Syncfusion Team October 6, 2022 02:58 PM UTC

Hi Leonardo,

Please find the response for the reported issue,

Reported issue

Response

 

I'm using the SfDataGrid control (latest version, 20.3.0.47) and I have an empty small column (1 px) that's not defined in my xaml code.

 

We have checked the reported issue on our end. In that, the mentioned border shows the empty space of the Grid which is not a column as you mentioned. However, you can hide that by using ColumnSizer as Star or AutoLastColumnFill, or AutoWithLastColumnFill. For more information related to ColumnSizer, please refer to the below user guide documentation link,  

 

UG Link: https://help.syncfusion.com/uwp/datagrid/columns#column-sizing

 

 

I would like to style the header in the Windows standard way too, see image below

with the gray gradient, but I can't find any ready template for it.

 

 

By default, our SfDataGrid provides different ways to style the column header. For more information related to styling the column header, please refer to the below user guide documentation and KB link,

 

UG Link: https://help.syncfusion.com/uwp/datagrid/styles-and-templates#styling-column-header

KB Link: https://www.syncfusion.com/kb/6046/how-to-apply-custom-style-for-gridheadercellcontrol

 

We have created the custom header template based on your requirement Please find the sample in the attachment that contains the custom header template. Based on that you can customize the column header as you required.  


Regards,
Dhanasekar M.

If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.


Attachment: UWP_bc6cf7da.zip

Marked as answer

LE Leonardo October 11, 2022 02:20 PM UTC

Thank you very much,

Everything working as expected now

Regards,

Leonardo



DM Dhanasekar Mohanraj Syncfusion Team October 12, 2022 01:59 PM UTC

Hi Leonardo,


We are glad that the reported issue was resolved on your side. Please let us know if you need any other details on this. As always, we will be happy to assist you.


Regards,

Dhanasekar M


Loader.
Live Chat Icon For mobile
Up arrow icon