VB代码
MshFlexGrid1.rows=MshFlexGrid1.rows+1
MshFlexGrid1.additem "a string", MshFlexGrid1.rows-1为什么这样给mshflexgrid添加一个记录,它会显示不出来??
谢谢

解决方案 »

  1.   

    with mfhflexgrid
        .rows=.rows+1
        .textmatrix(.rows-1,0)="a string"
    end with
      

  2.   

    MSHFlexGrid1.Rows = MSHFlexGrid1.Rows + 1
    MSHFlexGrid1.AddItem "a string", MSHFlexGrid1.Rows
      

  3.   

    运行一下你就明白了:Private Sub Form_Load()
        MSHFlexGrid1.Rows = 5
        MSHFlexGrid1.Cols = 3
        MSHFlexGrid1.Rows = MSHFlexGrid1.Rows + 1
        MSHFlexGrid1.AddItem "a string", MSHFlexGrid1.RowsEnd Sub