Board index » delphi » disable grid

disable grid

I know I have seen this answer here but cannot find it now.

I would like to disable the movement of the dbgrid while
iterating through the table to find a maximum value.
Just grid.enable := false obviously is not the answer.

Can anyone help me?

Thanks,

Don

 

Re:disable grid


Try this:    Table.DisableControls

Woody

Quote
Don Boje wrote in message <361A3643.FDFA9...@involved.com>...
>I know I have seen this answer here but cannot find it now.

>I would like to disable the movement of the dbgrid while
>iterating through the table to find a maximum value.
>Just grid.enable := false obviously is not the answer.

>Can anyone help me?

>Thanks,

>Don

Re:disable grid


And don't forget at the end of what you are doing:

Table.EnableControls;

I did once.

--
Michael Glatz
mgl...@briefcase.com

Quote
Woody wrote in message <6vdjj8$jv...@forums.borland.com>...
>Try this:    Table.DisableControls

>Woody

>Don Boje wrote in message <361A3643.FDFA9...@involved.com>...
>>I know I have seen this answer here but cannot find it now.

>>I would like to disable the movement of the dbgrid while
>>iterating through the table to find a maximum value.
>>Just grid.enable := false obviously is not the answer.

>>Can anyone help me?

>>Thanks,

>>Don

Re:disable grid


Good point.

Re:disable grid


Table.DisableControls;
try
    // do your stuff here
finally
    Table.EnableControls;
end;

otherwise if you end up with some Error your grid will remain disabled.
This strategy works well if you want to set your mouse cursor to an hour
glass.

Garry Kernan

Quote
Don Boje wrote in message <361A3643.FDFA9...@involved.com>...
>I know I have seen this answer here but cannot find it now.

>I would like to disable the movement of the dbgrid while
>iterating through the table to find a maximum value.
>Just grid.enable := false obviously is not the answer.

>Can anyone help me?

>Thanks,

>Don

Other Threads