Topic: TableGrid does not work correctly when using the "Increase Search" fun

TableGrid does not work correctly when using the "Increase Search" function see photo

Post's attachments

Attachment icon tableGrid.jpg 114.87 kb, 151 downloads since 2019-02-19 

Domebil

Re: TableGrid does not work correctly when using the "Increase Search" fun

Hi,
Can you attach your project and describe what is wrong?
I use the 'incremental search' feature in most of my projects and have never had any problems.
Derek.

Re: TableGrid does not work correctly when using the "Increase Search" fun

the problem occurs when you want to show the contents on multiple TableGrids from a table

Domebil

Re: TableGrid does not work correctly when using the "Increase Search" fun

this script blocks


procedure Form1_TableGrid2_OnChange (Sender: string);
var
   i,c: integer;
   s: string;
begin
c := Form1.TableGrid2.RowCount - 1;
Form1.TableGrid1.BeginUpdate;
     for i := 0 to c do
     begin
         s := Form1.TableGrid2.Cells[2,i];
         if s = '' then continue;
         if ValidDate(s) then
             if (StrToDate(s) - 15) < now then Form1.TableGrid2.Cell[2,i].TextColor := clGreen;
             if (StrToDate(s) - 10) < now then Form1.TableGrid2.Cell[2,i].TextColor := $0009ABE1;
             if (StrToDate(s) - 0) < now then Form1.TableGrid2.Cell[2,i].TextColor := clRed;
     end;
        TableGrid_OnChange(Form1.TableGrid2);
   Form1.TableGrid2.EndUpdate;
end;

Domebil

Re: TableGrid does not work correctly when using the "Increase Search" fun

solved, I was the script

Domebil