0
- 我有DataGridView名爲「DataGridView1」。
- 在DataGridView中,有兩列名爲「Process」,另一列名爲「Size」。
- 大小列是一個組合框。
當我點擊一個按鈕來創建一個進程時,它必須在Process列中輸入 中的「1」,並獲取用戶輸入的大小,並放入 「Chart1」(條形圖類型)。 - 我想獲取大小並存儲在一個名爲「UsedMemory」的變量中並放在圖表上。如何從Datagridview Combobox中獲取值?
Me.DataGridView1.Rows.Add("1") 'Add 1 to the first column (idk if it's right). For i = 0 To 25 Step 1 'populate the Combo with 25 items. Me.Tamanho.Items.Add(i) Next UsedMemory = 'I need the ComboValue here As Integer... and I don't know if I need to set up a default value. Me.Chart1.Series("Memory").Points.AddXY("Memory", UsedMemory)
非常感謝Josh!這對我幫助很大! –