Subject Re: [IBO] prevent Rowchange in Grid while state <>dssbrowse
Author Geoff Worboys
> if Prepared then
> begin
> CurRow := RowNum;
> // CheckBrowseMode; <-- Comment out this line!
> Inc( JumpRecs, CurRow - RowNum );
> end
>
> Now you can click on what you want (except your powerbutton :-)
> The only way to change the state / post is: press ESC, Your
> Cancel- or SaveButton
>
> Jason, please tell me if there is a way without changing the
> IB-Source.
> Greetings Christian

Jason,

Just a reminder that you had some reason for rejecting the fix shown
above when I suggested it back in September. I can dig up the emails
of our conversations regarding this if you like.

Also, I would like to suggest that perhaps the OnGetCanScroll handler
could be called prior to reordering. That way the one handler could
be used to prevent scrolling of a dataset. The reason why the Grid
MouseUp handler was required in the sample posted was to prevent
clicking on a grid title from taking effect during insert/edit.

An alternative to all this would be an "AutoPost" property
(default=true) that can be turned to false to prevent any dataset
scrolling while an edit/insert is in progress.


Geoff Worboys
Telesis Computing