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

Hidging a column in a grid list control

Thread ID:





31517 Jul 8,2005 11:45 AM UTC Aug 7,2005 08:25 PM UTC WinForms 6
Tags: GridControl
Asked On July 8, 2005 11:45 AM UTC

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

Replied On July 8, 2005 01:00 PM UTC

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

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....

Replied On July 11, 2005 04:10 PM UTC

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 04:37 PM UTC

This code works OK for me in CurrentCellShowingDropdown using version 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 07:44 PM UTC

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 08:25 PM UTC

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


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