Hi,
I have a 'TTIWDbGrid' with the following event 'OnAsyncCheckClick':
-----
procedure TIWTest.TestSuiteGridAsyncCheckClick(Sender: TObject; EventParams: TStringList; RowIndex, ColumnIndex: Integer);
begin
if (RowIndex < 0) then
Exit;
if (TestSuiteGrid.CellValues[4,RowIndex] = '') then
begin
TestSuiteGrid.OnCellClick := nil;
TestSuiteGrid.RowSelect[RowIndex] := false;
TestSuiteGrid.OnCellClick := TestSuiteGridCheckClick;
Exit;
end;
if TestSuiteGrid.RowSelect[RowIndex + TestSuiteGrid.RowOffSet] then
total_value := total_value2 + StrToFloatDef(TestSuiteGrid.CellValues[4,RowIndex],0.0)
else
if (total_value > 0.0) then
total_value := total_value2 - StrToFloatDef(TestSuiteGrid.CellValues[4,RowIndex],0.0);
TestSuiteGrid.Columns[4].FooterText := Format('%2.2f',[total_value]);
TotalWeightLabel.Caption := TestSuiteGrid.Columns[4].FooterText;
TestSuiteGrid.AsyncUpdateAllCells;
end;
-----
What happens is that it doesn't update the grid if I use this event in 'Async' mode. I have pictures in one column that are loaded at runtime (using HTML tags) that doesn't show up, as well, the footer value shown above doesn't update correctly , the rows of any page grater than 1 do not pass this test ('if (TestSuiteGrid.CellValues[4,RowIndex] = '') then') because it is always empty. This routine only works if I use 'OnCheckClick' event, but the side effect is the known flickering, of course. I tried to follow the tips of the document 'Async Capabilities IW grids', but to no avail.
Could you help me with tips that could solve this problem, please?
Regards,
Joao Lira.