Hi,
From past few hours i am struggling with very strange problem.
I have 3 drop down controls.
1st control is binding on page_load event
2nd control is binding on 1st drop down click
then its retrieving value and binding 3 drop down control > this happens on 1st drop down click only. Here goes issue, it shows datatable filled properly but not showing records in drop down on page.
Do anybody have an idea what issue can be.
Code is running properly.
code :
dtRequestBy = objDB.GetEmployeeName(cmbGroup.Text)
drRequestBy = dtRequestBy.NewRow()
drRequestBy.Item("FullName") = ""
drRequestBy.Item("Emp_id") = 0
dtRequestBy.Rows.InsertAt(drRequestBy, 0)
RadComboBox1.DataTextField = "FullName"
RadComboBox1.DataValueField = "Emp_id"
RadComboBox1.DataSource = dtRequestBy
RadComboBox1.DataBind()
Public Function GetEmployeeName(ByVal g_name As String) As DataTable
Try
cn = New SqlConnection(cnStr)
cn.Open()
Dim strSQL As String
strSQL = "select emp.Emp_id, FullName = emp.Emp_Salutation + ' ' + emp.Emp_FirstName + ' ' + emp.Emp_LastName from employee emp left join groups gp on gp.g_id=emp.emp_g_id WHERE gp.g_Name='" & g_name & "' order by Emp_FirstName"
Dim myDS As New DataSet
Dim myDataAdapter As New SqlDataAdapter(strSQL, cn)
myDataAdapter.Fill(myDS, "Employee")
Return myDS.Tables(0)
Catch ex As Exception
Finally
If cn.State = ConnectionState.Open Then cn.Close()
End Try
End Function
Any help is greatly appreciated.