Topic: 2 columms intenger

columm1 / columm2

if columm1 <=1 columm2 = yes     //  1+

if columm1 >=0 columm2= no       //   0-

please help me make this work.

Re: 2 columms intenger

begin
         if Form1.TableGrid1.Cells[1,i] = '1' then Form1.TableGrid1.CellS[2,i].Text := YES;
         if Form1.TableGrid1.Cells[1,i] = '0' then Form1.TableGrid1.CellS[2,i].Text := NO;
     end;


im try like this but dont work

Re: 2 columms intenger

You should use event OnChage of Tablegrid

procedure Form1_TableGrid1_OnChange (Sender: TObject);
begin
   ...
   if Form1.TableGrid1.Cells[1,i] = '1' then Form1.TableGrid1.CellS[2,i] := 'YES';
   if Form1.TableGrid1.Cells[1,i] = '0' then Form1.TableGrid1.CellS[2,i] := 'NO';
   ...
end;

But maybe better if you use calculated field for that

Dmitry.

4 (edited by amsjunior1 2019-06-12 12:31:10)

Re: 2 columms intenger

if Form1.TableGrid1.Cells[1,i] < 1 then Form1.TableGrid1.CellS[2,i] := 'YES';
   if Form1.TableGrid1.Cells[1,i] > 0 then Form1.TableGrid1.CellS[2,i] := 'NO';

help me convert this into a calculated field please

Re: 2 columms intenger

(CASE 
WHEN columm1 <= 1 THEN 'Yes' 
WHEN columm1 >= 0 THEN 'No'      
END)   
Dmitry.

6 (edited by amsjunior1 2019-06-14 03:42:58)

Re: 2 columms intenger

Possible column calculated with combobox filter?


(CASE
WHEN columm1 <= 1 THEN 'Yes'
WHEN columm1 >= 0 THEN 'No'     
END)

need to place a combobox search on this calculated column without repeating equal values