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.
it works when I don't add pre-columns to the Datagrid but when I add pre-columns it doesn't work!!
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.
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!
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.
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.
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.
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.