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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridDataControl + Wpf

Thread ID:





99164 May 3,2011 08:04 PM UTC May 4,2011 12:19 PM UTC ASP.NET Web Forms (Classic) 1
Tags: GridGroupingControl
Jose Colmenarez
Asked On May 3, 2011 08:04 PM UTC

Hi I have a grid connected to a collection when the collection has no element of the grid does not display the column headers, also shows the row for data entry

Thanks for the help

Manikandan [Syncfusion]
Replied On May 4, 2011 12:19 PM UTC

Hi Jose,

Thank you for using Syncfusion products.

We have checked with your requirement and found that you are trying to hide the Column Headers and AddNewRow row when the collection is empty. You can achieve your requirement by setting the Header Row height to zero and ShowAddNewRow to false as shown in the following code snippet :

Code Snippet[C#]

this.dataGrid.ShowAddNewRow = false;

this.dataGrid.ModelLoaded += new EventHandler(dataGrid_ModelLoaded);

void dataGrid_ModelLoaded(object sender, EventArgs e)
if (collec.Count == 0)
//hiding the column headers
this.dataGrid.Model.RowHeights[0] = 0d;



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon