Jump to content

Recommended Posts

Posted

In FishFacts_2009_2010 DEMO Project:

 

//MainModule add ClientDataSet AfterScroll Event

procedure TUniMainModule.ClientDataSetAfterScroll(DataSet: TDataSet);

begin

UniServerModule.Logger.AddLog('MainModule ClientDataSetAfterScroll');

end;

 

//Main.pas modify

procedure TMainForm.UniFormShow(Sender: TObject);

begin

UniServerModule.Logger.AddLog('UniFormShow Start');

DataSource1.DataSet.Open;

UniServerModule.Logger.AddLog('UniFormShow End');

end;

 

when start vcl, log collect:

FishFacts_2009_2010: 00000EF0: 12:26:15:UniFormShow Start

FishFacts_2009_2010: 00000EF0: 12:26:15:MainModule ClientDataSetAfterScroll

FishFacts_2009_2010: 00000EF0: 12:26:15:UniFormShow End

 

but in web mode start, log collect

FishFacts_2009_2010: 000016E0: 12:26:48:UniFormShow Start

FishFacts_2009_2010: 000016E0: 12:26:48:MainModule ClientDataSetAfterScroll

FishFacts_2009_2010: 000016E0: 12:26:48:UniFormShow End

FishFacts_2009_2010: 000013C8: 12:26:49:MainModule ClientDataSetAfterScroll

  • Administrators
Posted

There was an issue regarding multiple AfterScrolls in uniDBGrid: #0000964

 

This issue was fixed, but I'm aware that two Scroll events are triggered when DataSet is opened. This is not a bug and not new for 0.85.0. You can consider it as default behavior of DBGrid in web mode.

Posted

Because I don't know how/where to avoid the 2nd afterscroll events.

Hope can find method to avoid in web mode, this afterscroll event is so important.

 

Many thanks.

Posted

then test other issue:

 

when exists 2 grid, 2nd grid's data from 1st grid by afterscroll event,

if current 2nd grid's data record count euqal the afterscroll's latest record count

the 2nd grid's data has not update!

 

the following in 1st grid's afterscroll event code is not update

DataSet2 get data( etc trigger filter... )

 

 

but 1st grid's afterscroll event code must be write as:

 

DataSource2.DataSet:=nil;

DataSet2 get data( etc trigger filter... )

DataSource2.DataSet:=DataSet2;

 

It is ok.

 

remember the issue is exists in ver 0.84

  • Administrators
Posted

then test other issue:

 

when exists 2 grid, 2nd grid's data from 1st grid by afterscroll event,

if current 2nd grid's data record count euqal the afterscroll's latest record count

the 2nd grid's data has not update!

 

the following in 1st grid's afterscroll event code is not update

DataSet2 get data( etc trigger filter... )

 

 

but 1st grid's afterscroll event code must be write as:

 

DataSource2.DataSet:=nil;

DataSet2 get data( etc trigger filter... )

DataSource2.DataSet:=DataSet2;

 

It is ok.

 

remember the issue is exists in ver 0.84

 

Yes, this issue was logged before: #0000882

 

Hopefully this will be fixed in next beta release.

Posted

Dear Farshad:

 

about issue #0000989, whether can void 2 times trigger afterscroll event!

and when estimates will be build,

I will test complex ui state for it, and this is so important to project.

 

many thanks.

  • Administrators
Posted

Dear Farshad:

 

about issue #0000989, whether can void 2 times trigger afterscroll event!

and when estimates will be build,

I will test complex ui state for it, and this is so important to project.

 

many thanks.

 

I will try to locate source of it. I target it for version 0.85.1.

 

Again, I think you must redesign your app so it won't be affected by multiple AfterScroll events.

Posted

Many thanks.

 

because vcl app almost uses afterscroll event to get detail data, event deal with some business logic, so the afterscroll event is so important!

 

in vcl code like:

 

DataSet.AfterScroll:=nil;

Open Detail DataSet or Filter;

DataSet.AfterScroll:=(AfterScroll Event)

Trigger AfterScroll Event

 

In VCL, the code run fine, all trigger 1 times afterscroll event!

×
×
  • Create New...