Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 337
  • Last Modified:

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
0
Kristian
Asked:
Kristian
  • 3
1 Solution
 
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
 
kretzschmarCommented:
just to explain
the abort-procedure raises
a silent-exception,
the dataset will not scroll then
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.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now