資料庫讀進來後,在DataGridView1做完排序,之後畫出曲線的用法(抓某行某列值也有)

'資料庫讀進來後,在DataGridView1做排序
DataGridView1.Sort(DataGridView1.Columns(0),System.ComponentModel.ListSortDirection.Ascending)

'之後for迴圈用這個修正

  list1.Clear()  '清掉上次資料

  For Me.kgg = 0 To DataGridView1.Rows.Count - 1

                list1.Add(Me.kgg, DataGridView1.Rows(Me.kgg).Cells(5).Value)
   Next

EX   DataGridView1.Rows(0).Cells(5).Value     第5行  第1列的位置

       DataGridView1.Rows(10).Cells(3).Value   第3行  第10列的位置

arrow
arrow
    文章標籤
    DataGridView 排序
    全站熱搜

    JL8051 發表在 痞客邦 留言(0) 人氣()