The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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.
ADAdministrator Syncfusion Team 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
BSBhandhavi SangaruJune 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
ADAdministrator Syncfusion Team 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
BSBhandhavi SangaruJune 29, 2004 04:24 PM UTC
Stefan,
Thanks a lot.
Using "TypeOf el Is ColumnHeaderRow" worked.
Bhandhavi.