having what I consider a strange problem 4 ctrls on page. 2 are radcombo, 2 are dropdown. I am using the exact same SQL and datatables for both controls. the 2 drop downs are there for testing purposes.
essentially when index is changed on combo1, it should repopulate combo 2, which works just fine with regular dropdown. Please don't suggest the demo that populate the countries as this is what was already used as a guideline. like i said the two drop downs work jsut fine.
the error I keep getting is as soon as i enable line 15..
error is Selection out of range
Parameter name: value
JDCDD.DataBind()
thanks for any thoughts. mac
essentially when index is changed on combo1, it should repopulate combo 2, which works just fine with regular dropdown. Please don't suggest the demo that populate the countries as this is what was already used as a guideline. like i said the two drop downs work jsut fine.
the error I keep getting is as soon as i enable line 15..
error is Selection out of range
Parameter name: value
JDCDD.DataBind()
thanks for any thoughts. mac
Sub loaddpts() | |
Dim dt As New Data.DataTable | |
functions.FillDT(dt, ConnStrings.ConnectionStrings, "Select Distinct Department from leaders_employees where user_empid = '" & Session("EMPID") & "'") | |
CCDropDown.DataTextField = "Department" | |
CCDropDown.DataValueField = "Department" | |
CCDropDown.DataSource = dt | |
CCDropDown.DataBind() | |
End Sub | |
Sub fillJDCS(ByVal x As String) | |
Dim dptds As New Data.DataTable | |
Dim SQL As String = "Select Distinct sp_job_code,job_title from leaders_employees where department = '" & x & "' and user_empid = '" & Session("EMPID") & "'" | |
functions.FillDT(dptds, ConnStrings.ConnectionStrings, SQL) | |
JDCDD.DataSource = dptds | |
' JDCDD.DataValueField = "sp_job_code" | |
JDCDD.DataTextField = "Job_title" | |
JDCDD.DataBind() | |
End Sub | |
Protected Sub CCDropDown_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles CCDropDown.Load | |
If Not IsPostBack Then | |
loaddpts() | |
End If | |
End Sub | |
Protected Sub CCDropDown_SelectedIndexChanged1(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles CCDropDown.SelectedIndexChanged | |
fillJDCS(CCDropDown.SelectedValue) | |
End Sub | |
Protected Sub JDCDD_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles JDCDD.Load | |
If Not IsPostBack Then | |
fillJDCS(CCDropDown.SelectedValue) | |
End If | |
End Sub | |
Protected Sub DD1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles DD1.Load | |
If Not IsPostBack Then | |
Dim dt As New Data.DataTable | |
functions.FillDT(dt, ConnStrings.ConnectionStrings, "Select Distinct Department from leaders_employees where user_empid = '" & Session("EMPID") & "'") | |
DD1.DataSource = dt | |
DD1.DataTextField = "department" | |
DD1.DataValueField = "department" | |
DD1.DataBind() | |
End If | |
End Sub | |
Protected Sub DD2_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles DD2.Load | |
If Not IsPostBack Then | |
filldd2(DD1.SelectedValue) | |
End If | |
End Sub | |
Protected Sub DD1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DD1.SelectedIndexChanged | |
filldd2(DD1.SelectedValue) | |
End Sub | |
Sub filldd2(ByVal x As String) | |
Dim dt As New Data.DataTable | |
functions.FillDT(dt, ConnStrings.ConnectionStrings, "Select Distinct sp_job_code,job_title from leaders_employees where department = '" & x & "' and user_empid = '" & Session("EMPID") & "'") | |
DD2.DataSource = dt | |
DD2.DataTextField = "job_title" | |
DD2.DataValueField = "sp_job_code" | |
DD2.DataBind() | |
End Sub |