Delphi DBGrid 实现多选和获取多选的值
Delphi DBGrid 实现多选和获取多选的值
示例:
DBGrid1.Options:= DBGrid1.Options+[dgMultiSelect]; //设置DBGrid1多选属性 var SeCount,i:Integer; begin SeCount:=DBGrid1.SelectedRows.Count; //选中的数量 for i:=0 to SeCount-1 do begin DBGrid1.DataSource.DataSet.GotoBookmark( Pointer(DBGrid1.SelectedRows.items[i]) ); ShowMessage(DBGrid1.DataSource.DataSet.FieldByName('test).AsString); DBGrid1.DataSource.DataSet.Next; end; end;
创建时间:2020.09.03 更新时间:
博客园 滔Roy https://www.cnblogs.com/guorongtao 希望内容对你有所帮助,谢谢!