ListView combobox control at the end of line

时间:2016-07-11 20:21:27

标签: vb.net

Wondering how to place combobox control as last sub item for each row with some data coming from datasource. Have this code below:

LvSelMat.BeginUpdate()
Dim rodzajID as String = TreeMaterials.SelectedValue
Dim rodzajName as string = TreeMaterials.SelectedNode.Text
Dim parent as string = TreeMaterials.SelectedNode.Parent.Text

 Dim li as ListViewItem
li = LvSelMat.Items.Add(parent)
li.SubItems.Add(rodzajName)
li.SubItems.Add(rodzajID)

'Here want to add combobox...

so far i tried like this but its only showing up combobox without any other items in row...

  Dim combo as new combobox
    combo.DataSource = New Variation().GetAll
    combo.DisplayMember = "Name"
    combo.ValueMember = "Id"
    combo.dropdownstyle = ComboBoxStyle.DropDownList
    ' combo.height = item.bounds.height
    ' combo.location = new point(item.bounds.right, item.bounds.y)
    LvSelMat.controls.add(combo)

0 个答案:

没有答案