Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TStringGrid - goRowSelect AND goEditing

Status
Not open for further replies.

EIrinaAG

Programmer
Nov 18, 2010
2
RO
Hello everybody,

I have a 3 columns grid.
I would like to set the goRowSelect property but in the same time to have the possibility to edit the content of the middle column.

The first columns has names of variables, the last has the units for each variable while the middle columns contains the values, which can be changed.

So how can I have the row selected and then edit the middle cell in the row?

I tried different things, but it doesn't work ..

Any help is useful.

Thank you!
 
You should be able to click on the cell and edit it unless you are trying to do something different.



James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
I am trying to click on a cell, to have the whole row selected and still be able to edit the middle cell.

But recently I found out that when there is goRowSelect true, the cell selection is actually lost, as the whole row is now selected, that is why one cannot edit a cell and in the same time have the row selected.

The solution would be to override the DrawCell, but it's too laborious.

I've managed obtaining what I want by sticking together three grids with one column (to represent a table with 3 columns) and managing the focus and the editing in the middle column (actually grid), while in the other two just drawing the color so they look selected in the same time as the middle one.

But, if you have a better idea, I am looking forward for it.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top