我在读取DataGrid1中的数据时,出现了很郁闷的情况:
    If i > 0 Then
        For j = 0 To i - 1 Step 1
            With Me.DataGrid1
                .Col = 2
                .Row = j
                Text3.Text = Text3.Text + .Text
                MsgBox Text3.Text
            End With
        Next j
        For j = 0 To i - 1 Step 1  
            With Me.DataGrid1
                .Row = j
                .Col = 1
                Text4.Text = Text4.Text + .Text           
            End With
        Next j
    end if
其中text3.text中把DataGrid1每一个记录的Col = 2的数据都读出来了,但是text4.text中却没有读出来,一般是排在前面的记录没有读出来,特别是数据较多,有滚动条时。
请各位帮帮我呀----谢谢//////
如果换成直接操作数据源,当然可以解决问题,那样也不是很好的,请大家继续就DataGrid1
中数据读取讨论一下。也欢迎大家提供新的方法,有代码最好!--谢谢

解决方案 »

  1.   

    '把它写在一起呢?For j = 0 To i - 1 Step 1
                With Me.DataGrid1
                    .Col = 2
                    .Row = j
                    Text3.Text = Text3.Text + .Text
                    .COL=1
                    Text4.Text = Text4.Text + .Text 
                End With
      

  2.   

    现在有一个新问题,就是当计数到13个时,即text1.text中字符大于50个左右时,就无法往text1.text中增加字符了,请问,text1.text有字符限制吗
      

  3.   

    你自己检查一下 MaxLength 属性