' 定義
Dim dgvTableS As New DataTable
Dim dgvCmb As DataGridViewComboBoxColumn
dgvTableS.Columns.Add("Name", GetType(String))
dgvTableS.Columns.Add("Val", GetType(Integer))
dgvTableS.Rows.Add("鈴木", 0)
dgvTableS.Rows.Add("渡辺", 1)
dgvTableS.Rows.Add("柏原", 2)
dgvTableS.Rows.Add("林", 3)
dgvCmb = CType(m_dgvData.Columns(0), DataGridViewComboBoxColumn)
dgvCmb.DataSource = dgvTableS
dgvCmb.ValueMember = "Val"
dgvCmb.DisplayMember = "Name"
Dim dgvCmb As DataGridViewComboBoxColumn
dgvTableS.Columns.Add("Name", GetType(String))
dgvTableS.Columns.Add("Val", GetType(Integer))
dgvTableS.Rows.Add("鈴木", 0)
dgvTableS.Rows.Add("渡辺", 1)
dgvTableS.Rows.Add("柏原", 2)
dgvTableS.Rows.Add("林", 3)
dgvCmb = CType(m_dgvData.Columns(0), DataGridViewComboBoxColumn)
dgvCmb.DataSource = dgvTableS
dgvCmb.ValueMember = "Val"
dgvCmb.DisplayMember = "Name"
0 件のコメント:
コメントを投稿