Home > Back-end >  The second line in a great god guide: how to remove the dbgrit sixth column with the third line sixt
The second line in a great god guide: how to remove the dbgrit sixth column with the third line sixt

Time:12-08

Delphi a great god guide: how to draw out the second row 6 column with the third row in dbgrit sixth column value

CodePudding user response:

 procedure TMID_1_4_Frm. Button11Click (Sender: TObject); 
Var S1, S2: string;
The begin
DBGridEh1. The DataSource. The DataSet. First;//line 1
DBGridEh1. The DataSource. The DataSet. Next;//line 2
S1:=DBGridEh1 DataSource. The DataSet. Fields. [5] AsString;//row 2 column value 6
DBGridEh1. The DataSource. The DataSet. Next;//line 3
S2:=DBGridEh1 DataSource. The DataSet. Fields. [5] AsString;//row 2 column value 6
end;

CodePudding user response:

 procedure TMID_1_4_Frm. Button11Click (Sender: TObject); 
Var S1, S2: string;
The begin
DBGridEh1. The DataSource. The DataSet. First;//line 1
DBGridEh1. The DataSource. The DataSet. Next;//line 2
S1:=DBGridEh1 DataSource. The DataSet. Fields. [5] AsString;//row 2 column value 6
DBGridEh1. The DataSource. The DataSet. Next;//line 3
S2:=DBGridEh1 DataSource. The DataSet. Fields. [5] AsString;//row 2 column value 6
end;

CodePudding user response:

Procedure TMID_1_4_Frm. Button11Click (Sender: TObject);
Var S1, S2: string;
The begin
DBGrid1. The DataSource. The DataSet. First;//line 1
DBGrid1. The DataSource. The DataSet. Next;//line 2
S1:=DBGrid1 DataSource. The DataSet. Fields. [5] AsString;//row 2 column value 6
DBGrid1. The DataSource. The DataSet. Next;//line 3
S2:=DBGrid1 DataSource. The DataSet. Fields. [5] AsString;//row 2 column value 6
end;

CodePudding user response:

Lyhoo163 method is the most direct, of course, considering the setting dynamic value, can consider to use record number value,
  • Related