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.

Hidging a column in a grid list control

Thread ID:

Created:

Updated:

Platform:

Replies:

31517 Jul 8,2005 07:45 AM Aug 7,2005 04:25 PM Windows Forms 6
loading
Tags: GridControl
Marie-Eve
Asked On July 8, 2005 07:45 AM

So I can''t find the property to hide a column in my grid list control. I try Me.gridFavoris.Cols.Hidden() or Me.gridFavoris.ColStyles(COL_PROJET)... I wish that you''ll be able to help me !! thanks

Marie-Eve
Replied On July 8, 2005 09:00 AM

I forgot to specify that my grid list control is into a grid control same like the comboboxCells exemple in the Essential Grid Samples. So I want to acess to my grid list control who are in a cell !!!

Administrator [Syncfusion]
Replied On July 8, 2005 09:58 AM

Try code like this to see if it does what you need. GridDropDownGridListControlCellRenderer cr = (GridDropDownGridListControlCellRenderer) this.gridControl1.CellRenderers["GridListControl"]; cr.ListControlPart.Grid.Cols.Hidden[2] = true; //hide column 2....

Marie-Eve
Replied On July 11, 2005 12:10 PM

I tried that code and it''s work very well. But, I can''t find the right event to set this code. I tried CurrentCellShowingDropDown and it''s too late. The drop down list is correctly setting only the second time that I use it. I tried gridFavoris_CurrentCellActivating too and it''s seem to didn''t work. thanks.

Administrator [Syncfusion]
Replied On July 11, 2005 12:37 PM

This code works OK for me in CurrentCellShowingDropdown using version 3.2.1.0. What version are you using using? private void gridControl1_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e) { GridCurrentCell cc = this.gridControl1.CurrentCell; GridDropDownGridListControlCellRenderer cr = cc.Renderer as GridDropDownGridListControlCellRenderer; if(cr != null) { cr.ListControlPart.Grid.Cols.Hidden[2] = true; //hide column 2.... } }

Administrator [Syncfusion]
Replied On August 7, 2005 03:44 PM

I just found this and it hides the column but the space allocated for the dropdown is not adjusted so when I hide several wide columns the display seems really ugly.

Administrator [Syncfusion]
Replied On August 7, 2005 04:25 PM

This thread shows how to adjust teh width of teh dropdown in CurrentCellShowingDropDown. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=19403

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.

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.

;