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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Reg:gridControl Prop

Thread ID:

Created:

Updated:

Platform:

Replies:

32143 Jul 22,2005 12:13 PM UTC Jul 22,2005 01:29 PM UTC WinForms 1
loading
Tags: GridControl
Anna Srinivasan
Asked On July 22, 2005 12:13 PM UTC

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 01:29 PM UTC

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;
	}
}

CONFIRMATION

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.

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

;