通过Teditq确定的记录怎样在DBgrid中高亮显示出来

解决方案 »

  1.   

    加上
    procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
      DataCol: Integer; Column: TColumn; State: TGridDrawState);
    begin
      if (gdfocused in state) or (gdselected in state) then
      begin
        form1.DBGrid1.Canvas.Brush.Color:=clblue;
        form1.DBGrid1.Canvas.Pen.Mode:=pmmask;
        form1.DBGrid1.DefaultDrawColumnCell(rect,datacol,column,state);
      end;
    end;
      

  2.   

    for I:=1 to Table1.RecordCount do 
      if Trim(Edit1.Text)=Table1.FieldValues[SomeFieldValue] then
        //这里怎么写啊?呵呵,学习........
      

  3.   

    一楼的代码如何体现通过TEDIT确定呢?