none
datagridview column问题 RRS feed

  • 问题

  •  For Each line As String In lines
                Dim rowIndex As Integer = Me.DataGridView1.Rows.Add
                Dim words As String() = line.Split({" "c}, StringSplitOptions.RemoveEmptyEntries)
                Dim i As Integer = 0
                For Each word As String In words

                    Me.DataGridView1.Rows(rowIndex).Cells(i).Value = word
                    i += 1
                Next
            Next

    我写了以个代码是吧richtextbox1的数字全部导入到datagridview1.如下:

     a             b               c               d                e

     100           200            300             400

     250           300            400             500

    但是我想要从第二行(b)到(e)开始导入第一行保留(a),我的代码该怎样修改?

     a             b               c               d                e

                      100           200             300                400

                      250           300             400               500

    2012年2月17日 2:11

答案

全部回复