将DBGRID的属性options的dgmultiselect设为true就可以了!

解决方案 »

  1.   

    在Query的属性SQL中设置:select * from (表名)
      

  2.   

    to wwwwwwww(我我) :这样是记录可选择的前提。我现在是想让dbgrid中的记录缺省就是全选中的,而不是用鼠标选择。
      

  3.   

    写代码实现吧:
      table1.First;
      for i := 0 to Table1.RecordCount - 1 do
      begin
        DBGrid1.SelectedRows.CurrentRowSelected := true;
        table1.Next;
      end;
      

  4.   

    当然,首先还是需要把DBGRID的属性options的dgmultiselect设为true