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

hide the column header

I want to hide the column's header, how to do that?


8 Replies

DM Dhanasekar Mohanraj Syncfusion Team December 12, 2022 12:37 PM UTC

Hi Mohamad,


This requirement will be achievable by setting the SfDataGrid.HeaderRowHeight as 0 shown below,


this.sfDataGrid1.HeaderRowHeight = 0;


For more information related to HeaderRowHeight, please refer to the below user guide documentation link,

UG Link: https://help.syncfusion.com/windowsforms/datagrid/rows#hiding-header-row

Regards,

Dhanasekar M.


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



MO Mohamad December 13, 2022 08:44 AM UTC

it works when I don't add pre-columns to the Datagrid but when I add pre-columns it doesn't work!!



DM Dhanasekar Mohanraj Syncfusion Team December 14, 2022 02:01 PM UTC

Mohamad,

We are a little unclear about your scenario, here we have attached the tested sample for your reference. Please have a look at this, if you still facing the reported issue, please modify the attached sample based on your scenario. It will be helpful for us to check on it and provide you with a solution at the earliest.


Attachment: SfDatagridDemo_a42bf35c.zip


MO Mohamad December 17, 2022 06:59 AM UTC

I'm sorry to say you always have the same answer " We are a little unclear about your scenario " what I said is clear "when I added the sfdatagrid to the form I added the columns manually" so when I load the form I see the header although I made the height to 0, I think it's more clear now!



DM Dhanasekar Mohanraj Syncfusion Team December 20, 2022 06:44 AM UTC

Mohamad,

Currently, we have understood your scenario, in that you mentioned the pre-columns for defining the columns using the designer. We have checked the reported issue “HeaderRowHeight does not update properly while defining the columns in designer and set HeaderRowHeight in the code behind” on our end and it is confirmed as a defect. And We have logged a bug. We will include this fix in our NuGet release which is scheduled on January 03, 2023. We will share the feedback link for this issue by tomorrow December 20, 2022.



DM Dhanasekar Mohanraj Syncfusion Team December 20, 2022 02:13 PM UTC

Mohamad,


As we mentioned earlier, we have logged a bug for the reported scenario. We will include this fix in our NuGet release which is scheduled on January 03, 2023.


You can track the status of this report through the following feedback link,


Feedback Link: https://www.syncfusion.com/feedback/39873/headerrowheight-does-not-update-properly-while-defining-the-columns-in-designer

Note: The provided feedback link is private, and you need to log in to view this feedback.


We appreciate your patience until then.



DM Dhanasekar Mohanraj Syncfusion Team January 4, 2023 01:54 PM UTC

Mohamad,

We are unable to include the fix for this issue in our NuGet package which is released today. We will fix this issue and include it in our Weekly NuGet release scheduled for January 10, 2023. We appreciate your patience until then.



DM Dhanasekar Mohanraj Syncfusion Team January 10, 2023 11:50 AM UTC

Mohamad,

We would like to let you know that Essential Studio Weekly NuGet packages (v20.4.0.43) have been published in nuget.org with the fix for the issue “HeaderRowHeight does not update properly while defining the columns in designer and set HeaderRowHeight in the code behind”. Please let us know if you have any concerns about this.


Loader.
Up arrow icon