N
nydelphi
Unregistered / Unconfirmed
GUEST, unregistred user!
var<br> insert:TADOQuery;<br> begin<br> DM.QCadd.First;<br> insert:=TADOQuery.Create(self);<br> insert.Connection:=dm.Conn;<br> while not DM.QCadd.Eof do<br> begin<br> if DBGrideh1.SelectedRows.CurrentRowSelected then<br> begin<br> insert.Close;<br> insert.ParamCheck:=true;<br><br> insert.SQL.Clear;<br> insert.SQL.Add('INSERT INTO jiezhang (memuname)VALUES menuname)');<br> insert.Parameters.ParamByName('menuname').Value:=DBGrideh1.DataSource.DataSet.fieldbyname('menuname').AsString;<br> insert.ExecSQL;<br> end;<br> dm.QCadd.Next;<br> end;<br> dm.ADOQuery3.Close;<br> dm.ADOQuery3.SQL.Text:='select * from jiezhang';<br> dm.ADOQuery3.Open;<br><br>if DBGrideh1.SelectedRows.CurrentRowSelected then 在什么时候为true啊 <br><br>我用的是ehlib中的 dbgrideh 。<br>dbgrideh.options 多行选择已经为true了 为什么 执行的时候 <br>DBGrideh1.SelectedRows.CurrentRowSelected还是 false.....