CodePudding user response:
In the DBGrid Options properties, dgRowSelect and dgAlwaysShowSelection to True,And then change the number of rows in the DataSet directly, or through the Locate locating a line, the line is highlighted
DBGrid1. The DataSource. The DataSet. RecNo:=10;
CodePudding user response:
Must first have A relevant field conditions, such as "A" field, you can set the location into A="last" that line:
With DBGrid1. DateSurice. DateSet do
The begin
First;
While Not Eof do
The begin
If FieldByName (' A '). AsString='last' then exit.
Next;
end;
end;
CodePudding user response:
If you want to get the currently selected rows, can be obtained through SelectedIndex propertyCodePudding user response:
How to conform to the conditions of how lines to choose?CodePudding user response:
Open the multiple-choice Options. DgMultiSelect:=True;In his chosen SelectedRows, select the bookmark; Direct manipulation,