To disable column sorting, set the AllowSort property to False. This property can be set either in the designer or in code.
Locate the AllowSort property in the Properties window and set it to False.
Add the following code to the Form_Load event to set the AllowSort property to False.
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Me.C1TrueDBGrid1.AllowSort = False |
To write code in C#
C# |
Copy Code
|
---|---|
this.c1TrueDBGrid1.AllowSort = false; |
Clicking on the First column does not sort the column: