Stopping a row change in a DBCustimGrid.

I have a DBGrid component i have created, and everything is going fairly well, except i am trying to add a event that is called RowChanging(AllowChange : Boolean) with a property that either allows me to change the row or not depending on the result given.
then if it is ok, load the row and call a RowChanged Event....

how do i trap a row changing event, i have looked and apart from coding around it all with the before / after scroll events i cant see an easy way of doing it...

before I used a TCustomGrid and used the cell exit event and controlled it myself, but there isnt a cell change event on a DBGrid, there has to be a simple way that im missing...

Cheers Kristian
LVL 1
KristianAsked:
Who is Participating?
 
kretzschmarCommented:
just to explain
the abort-procedure raises
a silent-exception,
the dataset will not scroll then
0
 
kretzschmarCommented:
usually if i want to avoid a rowchange in a standard-dbgrid then i use the beforescroll-event of the underlying dataset by simple placing a abort there
0
 
KristianAuthor Commented:
i found the BeforScroll Event, but how do you abort the action ?
0
 
kretzschmarCommented:
if somecondition then
  abort;
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.