lgallion
asked on
Validate DevExpress Quantum Grid Field before Post
I am using Delphi and DevExpress Quantum Grid 6. Sometimes users don't fill in the necessary entries before posting which generates SQL "cannot insert NULL" errors in the application. I have tried to fix this on the Dataset level but canceling the post makes the user lose the data they have entered without any warning (not a very good solution). Is there any way to check the entries for empty (null) values before being passed to the dataset for posting? I can't simply check in the field exit because often the users simply skip the fields or accidentally click on another row causing a pre-mature post.
There is high propability, that yours grid is not responsible for that error, which is generated by db controls used by yours grid as data source. Most db query controls has event before post, where you can validate all data. If you call Abort in before post event, posting will be aborted and db control will stay in editing/inserting mode.
ASKER
dprochownik, the grid is not responsible for the error, I just want to find out how to check at the grid level before it gets to the data controller. Unfortunately there is not a published before post event on Quantum Grid 6 (it still exists but it is hidden, which makes me assume I am not supposed to use it, but I can't figure out how what is the preferred alternative).
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thanks kretzschmar, I was doing both a Cancel and an Abort in the Before Post when only an Abort was necessary.