Board index » delphi » Navigating calculated fields with Tab key in DBGrid

Navigating calculated fields with Tab key in DBGrid


2004-05-31 08:12:23 PM
delphi36
Hi,
in a ClientDataSet i have among some data fields also a
calculated field. All those fields are displayed in a DBGrid and
i'd like to know why i can not "tabStop" on the calculated field
(i.e. when i move through cells which represent data fields with
the Tab key, i can focus on them, but when i the calculated field
should receive the focus, it skips to the next data field ).
Thanx for any suggestions
 
 

Re:Navigating calculated fields with Tab key in DBGrid

Quote
CDS Calculated fields are effectively read only. A Calculated field's
value can only be set in the CDS.OnCalcFields event.
I know that, but on that field i have the ButtonStyle set to cbsEllipsis and
when the user clicks on it, some action happens. I want to improve that
behaviour, so that the user could "tabStop" on that calculated field and
press the Enter key, which would be the same as if the button in the cell
was clicked (i want to make it possible to enter the data without the use of
the mouse). So, i need to be in this calculated field in order to determine
the SelectedField property to handle in the OnEditButtonClick method.
Quote

BTW, the ClientDataSet is part of MIDAS(datasnap), not dbexpress, so
questions relating to it should be posted in the datasnap NG.
Sorry, i thought that this is more a question regarding the behaviour of the
DBGrid component (which is probbably a "general" component) and not about
the ClientDataSet. Next time I will post in the NG you suggested.
Thanx for any suggestions