Edit: more code
Dim oControl As New Forms.Control()
Using types As New DataSet
With oDal
.Parameters.Clear()
.Execute(sql, types)
End With
With ddlType
.DataSource = types.Tables(0)
.DataTextField = "Name"
.DataValueField = "TypeId"
.Items.Clear()
.DataBind()
If .Items.Count > 0 Then
.SelectedIndex = 0
End If
End With
End Using
'set queue type with our asp:dropdownlist control
oControl = New Forms.Control(Forms.Control.ControlType.ComboBox)
'we need to connect the two controls
oControl.Id = ddlType.ID
'add it to the grid
With .Columns.Add("CredentialTypeId", "Type", 85)
.Editor = oControl
End With
For some reason when you click the dropdown - "0" is displayed defaulted. It needs to be the first text/value pair from the table. The table is only returning one row at the moment, which is correct, but 0 still defaults.
Anyone know why?