Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread How To Trap Entry Error In TGridColumn?
Thu, May 3 2018 7:00 PMPermanent Link

Frederick Chin

I have a TGridColumn linked to a numeric field and the user is allowed to edit it. The field has a BeforeSave event that displays an error message if the entry is not numeric.

If the user enters a letter instead, EWB displays a runtime error that the entry is not a floating number and my event is not handled.

How do I ensure that entry errors are always handled by my event?

Additionally, after I acknowledge EWB's runtime error dialogue box and change the entry to a numeric value, moving the cursor up or down the grid row causes the cell to not be selected in full. How do I select the entire cell content as per attached image?

--
Frederick



Attachments: gridcursor.png
Wed, May 9 2018 3:44 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Frederick,

<< I have a TGridColumn linked to a numeric field and the user is allowed to edit it. The field has a BeforeSave event that displays an error message if the entry is not numeric.

If the user enters a letter instead, EWB displays a runtime error that the entry is not a floating number and my event is not handled.

How do I ensure that entry errors are always handled by my event? >>

I would use this event instead for the dataset column:

https://www.elevatesoft.com/manual?action=viewevent&id=ewb2&comp=TDataColumn&event=OnSetText

<< Additionally, after I acknowledge EWB's runtime error dialogue box and change the entry to a numeric value, moving the cursor up or down the grid row causes the cell to not be selected in full. How do I select the entire cell content as per attached image? >>

This appears to simply be an artifact of the way that the browser(s) are behaving, so I don't think I can do anything to change it.  I've tried several different ways of forcing the browser to select the contents of the edit control, but nothing seems to be working.

Tim Young
Elevate Software
www.elevatesoft.com
Image