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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Proper way to hide or remove row header (Column 0)

Thread ID:





5035 Jun 16,2003 02:48 PM UTC Jun 16,2003 04:31 PM UTC WinForms 1
Tags: GridControl
Warren Schudy
Asked On June 16, 2003 02:48 PM UTC

I have discovered three different ways to hide the row headers (column 0), but none are entirely satisfactory. I am using a GridControl in virtual mode with Essential Suite Two techniques hide the column, while a third attempts to make the column not a header column. The techniques, and their respective issues, are: 1) Setting the size to 0 in a QueryColumnWidth handler, as in the virtual tree grid example "VirtTreeGrid". The problem with this technique is that clicking on the left side of the leftmost column allows the user to begin a resize of column 0. 2) Setting gridControl.HideCols[0] to true fails when the user hides another column and then double-clicks between the header cells to unhide the unhidden columns. 3) Setting gridControl.Cols.HeaderCount to -1 makes column 0 only partially not a header. Column 0 remains frozen (and a resetFrozen call doesn't unfreeze it), and the arrow keys cannot be used to navigate onto column 0. Any suggestions on how to get rid of column 0 and/or make it act like a normal column?

Administrator [Syncfusion]
Replied On June 16, 2003 04:31 PM UTC

Try these events in conjunction with one another. The ResizingColumns event prevent the sizing cursor from showing.
private void gridControl1_QueryColWidth(object sender, GridRowColSizeEventArgs e)
	if(e.Index == 0)
		e.Size = 0;
		e.Handled = true;

private void gridControl1_ResizingColumns(object sender, GridResizingColumnsEventArgs e)
	if(e.Reason == GridResizeCellsReason.HitTest && e.Columns.IntersectsWith(GridRangeInfo.Col(0)))
		e.Cancel = true;


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

Live Chat Icon For mobile
Live Chat Icon