Forum > Databases

[solved] DBGrid - fix one column

(1/1)

Nicole:
I use a DBGrid with many colunms.
On scrolling to the right, I loose out of sight the table-id.
Is there a way, I can fix the column in a way, that it stays always on the left side, if the other columns scroll?

In other words: Is there a way to "fix" the first column of a DBGrid to a kind of index like the enumeration in an excel-sheet?

Hansvb:
I haven’t tried it…

--- Quote --- https://www.swissdelphicenter.ch/en/showcode.php?id=1001
--- End quote ---

Nicole:
works perfectly, thank you so much!
But I did not set it by code (this did not work), but in the object inspector.

to sum up the solution:
Set in the object inspector "fixed cols" to - in my case - the value 2.

egsuh:
There's a FixedCols property in the object inspector of TDBGrid.

Navigation

[0] Message Index

Go to full version