|
procedure TMainForm.DataGridKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
var
i,j,k,l : integer ;
vs :string ;
aList :TStringList;
begin
if key = 3 then
begin
if DataGrid.DataSource.dataset.State <>Tdatasetstate.dsBrowse then
DataGrid.DataSource.dataset.Post ;
vs :=DataGrid.FocusedField.AsString ;
i :=0 ;
j :=DataGrid.DataSource.dataset.RecNo ; //得当前行号
k :=0 ;
//l :=DataGrid.SelectedCount ;
...................
为什么DataGrid.SelectedCount 的值总是2啊??? |
|