Jump to content

How to get UniDBGrid.columns.editor text for calculated field


david_navigator

Recommended Posts

I have a dbgrid linked to Table A.
I have a calculated field in my database, depending on the value of field 1, the data displayed in calculated field 2 either comes from table X or table Y. 
This works well.

I also have a UnitEdit control as the Editor control for field 2.

 

If the user creates a new record in the grid, then I want to get what they typed in column2 (UniEdit) and save it in either table X or table Y as appropriate.

 

However I don't seem to be able to get this data.

I presume that because field 2 is calculated, none of the field events (onChange, OnSetText) get fired nor is the field actually updated i.e in the Table A onBeforePost event, field 2 has the value that was calculated rather than the value the user typed in to the control.
How can I retrieve the text in the control ?

I've tried UnitEdit1.text, but that always seems to return the design time value of the UnitEdit1.text property, rather than what the user typed.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...