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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GroupingGrid Column Headers

Thread ID:





15825 Jun 28,2004 05:56 PM UTC Jun 29,2004 04:24 PM UTC WinForms 4
Tags: Grouping
Bhandhavi Sangaru
Asked On June 28, 2004 05:56 PM UTC

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.

Administrator [Syncfusion]
Replied On June 28, 2004 07:07 PM UTC

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

Bhandhavi Sangaru
Replied On June 29, 2004 11:39 AM UTC

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

Administrator [Syncfusion]
Replied On June 29, 2004 02:43 PM UTC

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

Bhandhavi Sangaru
Replied On June 29, 2004 04:24 PM UTC

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


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

Live Chat Icon For mobile
Live Chat Icon