Programming => General => Topic started by: VinDerKlaus on February 27, 2020, 06:59:55 pm
Title: How to read cell in TStringGrid?
Post by: VinDerKlaus on February 27, 2020, 06:59:55 pm
If I have stringgrid and I want to read second cell in a selected row and assign to a string variable, how do this?
Thank you.
Title: Re: How to read cell in TStringGrid?
Post by: wp on February 27, 2020, 07:19:24 pm
What is the "second" cell? A grid is two-dimensional. You mean "second cell in first row" or "second cell in third column"?
Title: Re: How to read cell in TStringGrid?
Post by: VinDerKlaus on February 27, 2020, 07:29:33 pm
Good day wp.
I mean whichever row I have selected (I have goRowHighlight enabled) second cell in that row (horizontal, second from left) will be read. Thank you wp.
Title: Re: How to read cell in TStringGrid?
Post by: winni on February 27, 2020, 07:38:24 pm
Hi
Connect the onSelectCell event of your stringGrid with the following procedure: