大家好,stringgrid 没有获得所选行的行号的方法吗?我向得到所选行的行号. 谢谢大家

解决方案 »

  1.   

    为什么我用fastreport打印stringgrid内容的时候,
    在预览报表时Fastreport总是报"未完义符号CELL1"错误呢?代码如下:procedure TS_Fabric_RanSeDingDan_Main.Fabric_RanseDingDanGetValue(
      const ParName: String; var ParValue: Variant);
    begin
      if AnsiCompareText(ParName, 'Cell1') = 0 then
        ParValue := Grid1.Cells[0, BuLei.RecNo]
      else if AnsiCompareText(ParName, 'Cell2') = 0 then
        ParValue := Grid1.Cells[1, BuLei.RecNo]
      else if AnsiCompareText(ParName, 'Cell3') = 0 then
        ParValue := Grid1.Cells[2, BuLei.RecNo]
      else if AnsiCompareText(ParName, 'Cell4') = 0 then
        ParValue := Grid1.Cells[3, BuLei.RecNo]
      else if AnsiCompareText(ParName, 'Cell5') = 0 then
        ParValue := Grid1.Cells[4, BuLei.RecNo]
    end;是不是还有其它地方错误呢?
      

  2.   

    那就试一试。frvariables['Cell1']:=Grid1.Cells[0, BuLei.RecNo] ......
    以前我就是这么用的,运行正常,frvariables['Cell1']:= 可以写在任何一个事件中。
    现在我用fastreport3.0 半年前就这么用的。参考一下。
      

  3.   

    ok啦,
    非常感谢tayir82(tayir)
      

  4.   

    tayir82(tayir)
    真不好意思,我不知道怎么给分给你哟,有谁能够告我呢?