黄聪:DBGrid中遍历选中行

TDataSet pDS : = DBGrid1.DataSource.DataSet;
for i: = 0 to DBGridEhList.SelectedRows.Count do
begin
pDS.GotoBookmark(Pointer(DBGridEhList.SelectedRows.Items[i]));
pDS.Edit();
pDS.FieldByName(
' Password ' ).Value = ' 123 ' ;
pDS.Post();
end ;

你可能感兴趣的:(grid)