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

Reg:gridControl Prop

Thread ID:





32143 Jul 22,2005 08:13 AM Jul 22,2005 09:29 AM Windows Forms 1
Tags: GridControl
Anna Srinivasan
Asked On July 22, 2005 08:13 AM

Hi, I want hide one column which present in the gridcontrol. if i set colwidth = 0, i think i can able to get that.But if user resize the colwidth hide thing gone. How do i do that..? same case I want resize property also..... Anna

Administrator [Syncfusion]
Replied On July 22, 2005 09:29 AM

Is your question how can your user be able to resize a column so it is visible if you have set its colwidth = 0? If so, you can set things up so if the user double clicks the border where the hidden column is, the column would reappear. You can use the colssizing event to handle this.
private void gridControl1_ResizingColumns(object sender, GridResizingColumnsEventArgs e)
	if(e.Reason == GridResizeCellsReason.DoubleClick
		&& e.Columns.Right < this.gridControl1.ColCount
		&& this.gridControl1.ColWidths[e.Columns.Right+1] == 0
		this.gridControl1.ColWidths[e.Columns.Right+1] = this.gridControl1.DefaultColWidth;
		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.

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.