Recent

Author Topic: [solved] DBGrid - fix one column  (Read 1160 times)

Nicole

  • Hero Member
  • *****
  • Posts: 1009
[solved] DBGrid - fix one column
« on: June 05, 2024, 03:45:57 pm »
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?
« Last Edit: June 05, 2024, 07:35:37 pm by Nicole »

Hansvb

  • Hero Member
  • *****
  • Posts: 718
Re: DBGrid - fix one column
« Reply #1 on: June 05, 2024, 07:22:05 pm »

Nicole

  • Hero Member
  • *****
  • Posts: 1009
Re: DBGrid - fix one column
« Reply #2 on: June 05, 2024, 07:35:19 pm »
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.
« Last Edit: June 05, 2024, 07:37:17 pm by Nicole »

egsuh

  • Hero Member
  • *****
  • Posts: 1519
Re: [solved] DBGrid - fix one column
« Reply #3 on: June 07, 2024, 07:02:44 am »
There's a FixedCols property in the object inspector of TDBGrid.

 

TinyPortal © 2005-2018