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. Image for the cookie policy date

GroupingGrid Column Headers

How can I disable the column headers? (clickable = false) I tried below options, but none worked. gridGroupingControl1.TableDescriptor.Appearance.AnyHeaderCell.Enabled = False gridGroupingControl1.TableDescriptor.Appearance.ColumnHeaderCell.Clickable = False gridGroupingControl1.BaseStyles("Header").StyleInfo.Clickable = False Thanks, Bhandhavi.

4 Replies

AD Administrator Syncfusion Team June 28, 2004 03:07 PM

Hi Bhandhavi, the TableControlCellClick allows you to cancel click operations on the column header. Here is an example for this: this.gridGroupingControl1.TableControlCellClick += new GridTableControlCellClickEventHandler(gridGroupingControl1_TableControlCellClick); private void gridGroupingControl1_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e) { Element el = e.TableControl.Table.DisplayElements[e.Inner.RowIndex]; if (el is ColumnHeaderRow) e.Inner.Cancel = true; } Stefan


BS Bhandhavi Sangaru June 29, 2004 07:39 AM

Stefan, Thanks! Thats exactly what I want. But I am not able to use ColumnHeaderRow. I am getting a Syntax error - ''ColumnHeaderRow is a type and cannot be used as an expression. Please Help! Bhandhavi. AddHandler Me.GridGroupingControl1.TableControlCellClick, AddressOf GridGroupingControl1_TableControlCellClick Private Sub GridGroupingControl1_TableControlCellClick(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCellClickEventArgs) Handles GridGroupingControl1.TableControlCellClick Dim el As Element = e.TableControl.Table.DisplayElements(e.Inner.RowIndex) If (el Is ---------) Then e.Inner.Cancel = True End If End Sub


AD Administrator Syncfusion Team June 29, 2004 10:43 AM

Bhandavi, this the VB code that should work: AddHandler Me.gridGroupingControl1.TableControlCellClick, AddressOf gridGroupingControl1_TableControlCellClick Private Sub gridGroupingControl1_TableControlCellClick(sender As Object, e As GridTableControlCellClickEventArgs) Dim el As Element = e.TableControl.Table.DisplayElements(e.Inner.RowIndex) If TypeOf el Is ColumnHeaderRow Then e.Inner.Cancel = True End If End Sub ''gridGroupingControl1_TableControlCellClick Stefan


BS Bhandhavi Sangaru June 29, 2004 12:24 PM

Stefan, Thanks a lot. Using "TypeOf el Is ColumnHeaderRow" worked. Bhandhavi.

Loader.
Live Chat Icon For mobile
Up arrow icon