I was asked to add a row to a data set that is already in memory to be put into a combo box.
where and how do i put it in my code? It needs to say in combo box "Select Item"
'Location
Try
Dim colNames() As String = {"InventoryLocation", "InventoryLocationID", "Description"}
Dim dt As DataTable
dt = InvLocationAdapter.GetinvLocation
With MtgcboInvLoc
.Items.Clear()
.ColumnNum = 3
.ColumnWidth = "30;0;100"
.GridLineHorizontal = True
.GridLineVertical = True
.SourceDataString = colNames
.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
.SourceDataTable = dt
.SelectedIndex = 0
End With
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error" & " Get Inventory Locations")
End Try
where and how do i put it in my code? It needs to say in combo box "Select Item"
'Location
Try
Dim colNames() As String = {"InventoryLocation", "InventoryLocationID", "Description"}
Dim dt As DataTable
dt = InvLocationAdapter.GetinvLocation
With MtgcboInvLoc
.Items.Clear()
.ColumnNum = 3
.ColumnWidth = "30;0;100"
.GridLineHorizontal = True
.GridLineVertical = True
.SourceDataString = colNames
.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
.SourceDataTable = dt
.SelectedIndex = 0
End With
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error" & " Get Inventory Locations")
End Try