Thank you for your support in the past. I have an issue with autocomplete for a combo box.
I implemented autocomplete for a rad combo box. This works fine the first time and items are pulled in as I type the employee name. However, if I select an employee and then return to select another employee, the auto complete freezes at "uploading...". Is there a work around for this? What am I doing wrong?
Thank you very much.
Suresh
Here is the rad combo box declaration:
<telerik:radcombobox id="RadComboBoxEmployeeName" runat="server" AutoPostBack="true" OnItemsRequested="RadComboBoxEmployeeName_ItemsRequested" AccessibilityMode="True" AllowCustomText="True" EnableLoadOnDemand="True" Width="174px"></telerik:radcombobox>
Code behind for RadComboBoxEmployeeName:
Protected Sub RadComboBoxEmployeeName_ItemsRequested(ByVal sender As Object, ByVal e As RadComboBoxItemsRequestedEventArgs)
'add only the companies that meet the search criterion
Dim objPE As New ProposalEmployee
Dim dt As DataTable
dt = objPE.GetAllLikeEmployees(e.Text).Tables(0)
Dim comboBox As RadComboBox = DirectCast(sender, RadComboBox)
comboBox.Items.Clear()
For Each row As DataRow In dt.Rows
Dim item As New RadComboBoxItem()
item.Text = row("EmployeeName").ToString()
item.Value = row("EmployeeNo").ToString()
comboBox.Items.Add(item)
Next
End Sub
Selected index change for RadComboBoxEmployeeName:
Protected Sub RadComboBoxEmployeeName_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles RadComboBoxEmployeeName.SelectedIndexChanged
Try
WriteLine("RadComboBoxEmployeeName_SelectedIndexChanged")
Dim strEmployeeNo As String
strEmployeeNo = RadComboBoxEmployeeName.SelectedValue
If strEmployeeNo = "" Then
Exit Sub
End If
Dim objPE As New ProposalEmployee
Dim ds As DataSet = objPE.GetEmployee(strEmployeeNo)
lblAssmtDate.Text = ds.Tables(0).Rows(0)("AssessmentDate")
lblBillRate.Text = "" 'ds.Tables(0).Rows(0)("BillRate")
lblBurdenedRate.Text = ds.Tables(0).Rows(0)("StandardBurdenRate")
lblChangedBy.Text = ds.Tables(0).Rows(0)("ChangedUserId")
lblChangedDate.Text = ds.Tables(0).Rows(0)("ChangedDateTime")
'lblContractVehicle.Text = ds.Tables(0).Rows(0)("LaborSchedule")
lblCreatedBy.Text = "" 'ds.Tables(0).Rows(0)("CreatedUserId")
lblCreatedDate.Text = "" 'ds.Tables(0).Rows(0)("CreatedDateTime")
lblEducation.Text = "" 'ds.Tables(0).Rows(0)("Education")
lblEmployeeName.Text = ds.Tables(0).Rows(0)("EmployeeName")
lblEmployeeNo.Text = ds.Tables(0).Rows(0)("EmployeeNo")
lblExperience.Text = "" 'ds.Tables(0).Rows(0)("Experience")
lblOriginalCC.Text = ds.Tables(0).Rows(0)("CC")
lblProfit.Text = "" 'ds.Tables(0).Rows(0)("Profit")
lblRefId.Text = "" 'ds.Tables(0).Rows(0)(0)
lblTitle.Text = ds.Tables(0).Rows(0)("TitleDesc")
txtTBDWageRate.Text = ds.Tables(0).Rows(0)("StandardCostRate")
'drpCostCenterForEmployee.SelectedValue = ds.Tables(0).Rows(0)("AdjustedCC")
drpTBDTitle.SelectedValue = "" 'ds.Tables(0).Rows(0)("TBDTitle")
'drpSite.SelectedValue = ds.Tables(0).Rows(0)("Site")
txtAnnualSalary.Text = ds.Tables(0).Rows(0)("AnnualSalary")
'drpContractVehicle.SelectedValue = ds.Tables(0).Rows(0)("LaborSchedule")
'drpLaborCategory.SelectedValue = ds.Tables(0).Rows(0)("LaborCategoryCode")
txtNewNotes.Text = ""
'txtPrevNotes.Text = ds.Tables(0).Rows(0)("Notes")
PopulateCostCenterScheduleAndLC()
Catch ex As Exception
CmFunc.ErrorLog("PropoposalEmployeeDetails_Load", ex.ToString())
lblErrorMsg1.Text = ex.Message
End Try