or
I have a
GridViewComboBoxColumn
in a radgridview. Could someone suggest to me how I could force the combobox column to show its drop down when a row is added?
Ryan
| Private Sub DescriptionComboBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) |
| Dim descriptionComboBoxEditor As RadComboBoxEditor = New RadComboBoxEditor |
| Dim newDescription As String = Nothing |
| Dim pdHelperWebService As New pdhelper.PDHelper |
| Dim ds As DataSet |
| Dim dt As DataTable |
| Dim filter As String = Nothing |
| Dim comboItem As RadComboBoxItem |
| descriptionComboBoxEditor = CType(sender, RadComboBoxEditor) |
| descriptionComboBoxEditor.AutoCompleteMode = AutoCompleteMode.None |
| newDescription = descriptionComboBoxEditor.Text |
| descriptionComboBoxEditor.Items.Clear() |
| If Not String.IsNullOrEmpty(newDescription) AndAlso newDescription.Length >= 3 Then |
| 'Call the webservice |
| ds = myWebService.GetItems(newDescription) |
| dt = ds.Tables("MY_RESULTS") |
| 'Add each item to the combobox |
| For Each item As DataRow In dt.Rows |
| comboItem = New RadComboBoxItem |
| comboItem.Text = item("DESCRIPTION") |
| comboItem.Value = item("DESCRIPTION") |
| If Not (TypeOf (item("TOOLTIP")) Is DBNull) AndAlso _ |
| item("TOOLTIP") IsNot Nothing Then |
| comboItem.ToolTipText = item("TOOLTIP") |
| End If |
| descriptionComboBoxEditor.Items.Add(comboItem) |
| Next |
| 'Show the drop down if it's not already shown |
| If Not descriptionComboBoxEditor.IsPopupOpen Then |
| descriptionComboBoxEditor.ShowPopup() |
| End If |
| End If |
| pdHelperWebService.Dispose() |
| End Sub |