请问在如何在Stringgrid的第一行就是外观为灰色按钮的那一行上加入我想要的字符串?
例如姓名性别等等?不是数据库所以没用DBgrid
另外Stringgrid能否实现自动排序功能?

解决方案 »

  1.   

    用ADVGRID6吧~~~~很好用www.51delphi.com
    www.playicq.com
    有下
      

  2.   

    如:
          StringGrid1.Cols[0].Text := '经办人';
          StringGrid1.Cols[1].Text := '复核人';排序要自己做
    超级猛料也有几个例程
      

  3.   

    stringgrid1.cells[0,0]:='姓名';
    stringgrid1.cells[1,0]:='性别';
    不能自动排序功能!
      

  4.   

    1、不能实现自动排序功能。
    2、加入你想要的字符串、设置列宽、加序号
          with StringGrid1 do
          begin
             Cells[0,0] := ' 序号';       Cells[1,0] := '   收费项目';
             Cells[2,0] := ' 数  量';      Cells[3,0] := '   单  价';
             Cells[4,0] := '    金   额';     Cells[5,0] := ' 货 币';
             Cells[6,0] := '  汇 率';     Cells[7,0] := '  本币金额';
             Cells[8,0] := '   收款方';    Cells[9,0] := '    备  注';
             Cells[10,0] := '应付第三方';     Cells[11,0] := '标志';
             ColWidths[2] := -1 ;ColWidths[3] := -1 ;
             ColWidths[10] := -1 ;ColWidths[11] := -1 ;         for iLoop := 1 to RowCount -1 do
             begin
                Cells[0,iLoop] := inttostr(iLoop) ;
                Cells[11,iLoop] := '1' ;
             end ;
          end ;