To freeze columns in the grid, set the Frozen property to True. Freezing columns locks them from being scrolled and also prevents all columns with a lesser index from being scrolled. This property can be set either in the designer or in code.
Add the following code to the Form_Load event to freeze the Last column:
C# |
コードのコピー
|
---|---|
c1TrueDBGrid1.Splits[0].DisplayColumns[2].Frozen = true;
|
C# |
Copy Code
|
---|---|
c1TrueDBGrid1.Splits[0].DisplayColumns[2].Frozen = true; |