tdbgrid1.datasource.dataset.first; tdbgrid1.datasource.datast.move(n);//n:integer; // that is you want to move the point of the cursor showmessage(tdbgrid1.datasource.dataset.fields[i].asstring); //i:integer; bteween 0 and dataset.fieldcount-1
可以这样 tdbgrid1.datasource.dataset.RecNo := n;////n为行数 a := tdbgrid1.datasource.dataset.Fields[m-1];//n行m列的数据覆给a
在tdbgrid中如何为指定的某行某列付值 根据条件指定某一行: tdbgrid.DataSet.Locate('FieldName1;FieldName2', VarArrayOf(['值1', '值2']),loPartialKey]); 指定某列: if DBGridEh1.SelectedField='某字段' then
tdbgrid1.datasource.datast.move(n);//n:integer;
// that is you want to move the point of the cursor
showmessage(tdbgrid1.datasource.dataset.fields[i].asstring);
//i:integer; bteween 0 and dataset.fieldcount-1
tdbgrid1.datasource.dataset.RecNo := n;////n为行数
a := tdbgrid1.datasource.dataset.Fields[m-1];//n行m列的数据覆给a
根据条件指定某一行:
tdbgrid.DataSet.Locate('FieldName1;FieldName2', VarArrayOf(['值1', '值2']),loPartialKey]);
指定某列:
if DBGridEh1.SelectedField='某字段' then