Subject | Re: [IBO] prevent Rowchange in Grid while state <>dssbrowse |
---|---|
Author | stahlberger@t-online.de |
Post date | 2001-04-12T12:02:02Z |
these 3 thinks are to do to make a Grid "Usersave" while in
dssedit/dssinsert:
1. // prevent form keyup, keydown
procedure TFormLager.qryLagerBewBeforeScroll(IB_Dataset: TIB_Dataset);
begin
if qryLagerBew.state in [dssedit,dssinsert] then abort;
end;
2. // prevent mousclick on titelbar / columnhaeder
procedure TFormLager.grdLagerBewMouseUp(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if qryLagerBew.state in [dssedit,dssinsert] then abort;
end;
3. // prevent click on another row
in The TIB_Dataset.MoveBy procedure you will see the following code...
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
dssedit/dssinsert:
1. // prevent form keyup, keydown
procedure TFormLager.qryLagerBewBeforeScroll(IB_Dataset: TIB_Dataset);
begin
if qryLagerBew.state in [dssedit,dssinsert] then abort;
end;
2. // prevent mousclick on titelbar / columnhaeder
procedure TFormLager.grdLagerBewMouseUp(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if qryLagerBew.state in [dssedit,dssinsert] then abort;
end;
3. // prevent click on another row
in The TIB_Dataset.MoveBy procedure you will see the following code...
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
----- Original Message -----
From: "Tomas MichalĂk" <michalik@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, April 12, 2001 1:20 PM
Subject: Re: [IBO] prevent Rowchange in Grid while state <>dssbrowse
| Hi,
|
| stahlberger@... wrote:
| > Found a way in a thread from sep.t/2000
|
| For those who don't have the message or can't find it - subject of that
| thread is "Intercepting scroll while state in dssEdit/dssInsert" and I
| was able to find it on MERS archives.
|
| As I don't have a full source I can't make the suggested change in
| TIB_DataSet.MoveBy method. I verified that current version (3.6D) still
| need that change in order to solve this issue. Would that change hurt
| some other functionality ? If not, could it be changed in next minor IBO
| version ?
|
| Regards,
| Tom
|
| > ----- Original Message -----
| > From: <stahlberger@...>
| > To: <IBObjects@yahoogroups.com>
| > Sent: Thursday, April 12, 2001 8:19 AM
| > Subject: [IBO] prevent Rowchange in Grid while state <>dssbrowse
| >
| > | Hi all,
| > | any ideas how to "freeze" an IB_grid while query.state <> dssbrowse?
| > | For up- and downkey i use OnBeforeScroll to lock the Grid to the
current
| > | inserting/editing Row, works fine.
| > | To prevent from Mousclicks on another Row i have no idea. Do You?
|
| =================================
|
| Tomas Michalik
| ProCA, s. r. o.
| V Luzich 818, Praha 4
| Czech Republic
|
| e-mail: michalik@...
| tel: +420 2 67283446
|
|
|
|
| Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|
|