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

How to disable a column Header

Thread ID:

Created:

Updated:

Platform:

Replies:

52917 Dec 6,2006 03:10 AM UTC Dec 6,2006 09:21 AM UTC Windows Forms 5
loading
Tags: Grouping
Pawan Adur
Asked On December 6, 2006 03:10 AM UTC

Hi ,
how can i disable column header in a cell which is a DropDownList.

Administrator [Syncfusion]
Replied On December 6, 2006 05:04 AM UTC

Hi Pawan,

You can access the GridDropDownGridListControlCellRenderer and set the ListPart.ShowColumnHeader property to turn OFF/ON the dropdown list column header in a grid cell. Here is a code snippet to show this.

GridDropDownGridListControlCellRenderer cr = this.grid.TableControl.CellRenderers["GridListControl"] as GridDropDownGridListControlCellRenderer;
cr.ListControlPart.ShowColumnHeader = false;

Best Regards,
Haneef

Pawan Adur
Replied On December 6, 2006 06:05 AM UTC

but i cant do this with GroupingGridControl..


>Hi ,
how can i disable column header in a cell which is a DropDownList.

Administrator [Syncfusion]
Replied On December 6, 2006 06:30 AM UTC

Hi Pawan,

Please try the attached sample and let me know if you are trying something different.
GGCHideDropDownColumnHeader.zip

Best Regards,
Haneef

Pawan Adur
Replied On December 6, 2006 06:52 AM UTC

hi haneef,
the example was good.but i have DropDownList is all the cells ..but i need 2 disable only two on them ..



>Hi Pawan,

Please try the attached sample and let me know if you are trying something different.
GGCHideDropDownColumnHeader.zip

Best Regards,
Haneef

Administrator [Syncfusion]
Replied On December 6, 2006 09:21 AM UTC

Hi Pawan,

You can handle the TableControlCurrentCellShowingDropDown event and set the ListControlPart.ShowColumnHeader property for required cells in a grid. Here is a code snippet.

private void gridGroupingControl1_TableControlCurrentCellShowingDropDown(object sender, GridTableControlCurrentCellShowingDropDownEventArgs e)
{
GridCurrentCell cc = e.TableControl.CurrentCell;
if( cc.ColIndex == 1 && cc.RowIndex == 5)
{
GridDropDownGridListControlCellRenderer cr = cc.Renderer as GridDropDownGridListControlCellRenderer;
if( cr != null)
cr.ListControlPart.ShowColumnHeader = false;
}
}

Modified Sample: GGCHideDropDownColumnHeader.zip

Best Regards,
Haneef

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

;