Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Initfind puts dataset in editmode
Mon, Jun 6 2016 8:36 AMPermanent Link

Ronald

Hi,

I need to find the row with the columns 'Activ" with value 1. My code looks like this:

tbYearPeriods.DisableControls;
tbYearPeriods.InitFind;
tbYearPeriods.Columns['activ'].AsInteger:=1;
tbYearPeriods.Find(false);
tbYearPeriods.EnableControls;

But the code puts the table in editmode and I do not want that since other events then respond so I added Disablecontrols, but that does not keep the dataset from responding with editmode.

What am I missing here?

Greetings,
Ronald
Mon, Jun 6 2016 9:28 AMPermanent Link

Ronald

Ronald wrote:

>I need to find the row with the columns 'Activ" with value 1. My code looks like this:

>tbYearPeriods.DisableControls;
>tbYearPeriods.InitFind;
>tbYearPeriods.Columns['activ'].AsInteger:=1;
>tbYearPeriods.Find(false);
>tbYearPeriods.EnableControls;

>But the code puts the table in editmode and I do not want that since other events then respond so I added >Disablecontrols, but that does not keep the dataset from responding with editmode.

>What am I missing here?

I know wht I am missing. The "disablecontrols" is only for the controls and not the events. The events were quite heavy and I think that it just frooze.
Now I first set tbYearPeriodes.OnRowCange to NIL and it works fine now.

Ronald
Image