pamela rizk
asked on
REad dataset of a drop down list
hi
i have a drop down list filled from server side as below:
(where SelectStatusCbo is the drop down and lStatusDS is the dataset)
With SelectStatusCbo
.DataSource = lStatusDS.Tables(0)
.DataTextField = "Status_DescE" '"P_cle_stat"
.DataValueField = "internalCode" '"p_stat_int"
.DataBind()
End With
the dataset contains teh below column :
Process1, Status_DescE and internalCode
nowin javascript i need to do the below:
$("#" + SelectStatusCbo.id).on("ch ange", function () {
//need to read the dataset and appropriate column of teh datase how to dow it?
}
well i need to read the dataset of the drop down in javascript goto the selected index and read each column value how to do it?
i have a drop down list filled from server side as below:
(where SelectStatusCbo is the drop down and lStatusDS is the dataset)
With SelectStatusCbo
.DataSource = lStatusDS.Tables(0)
.DataTextField = "Status_DescE" '"P_cle_stat"
.DataValueField = "internalCode" '"p_stat_int"
.DataBind()
End With
the dataset contains teh below column :
Process1, Status_DescE and internalCode
nowin javascript i need to do the below:
$("#" + SelectStatusCbo.id).on("ch
//need to read the dataset and appropriate column of teh datase how to dow it?
}
well i need to read the dataset of the drop down in javascript goto the selected index and read each column value how to do it?
ASKER
no this solution does not work for me because this user control is used in many other web forms so i cannot change the value field and split the result
i want a way where i need to read the dataset of this drop down from javascript without changing the datavaluefield
i want a way where i need to read the dataset of this drop down from javascript without changing the datavaluefield
It is not clear which part you need assistance with
What is going to happen in the change handler - what is it the code is meant to do?
$("#" + SelectStatusCbo.id).on("change", function () {
//need to read the dataset and appropriate column of teh datase how to dow it?
}
Are you asking how to go back to the server at this point or do you already have the data locally?What is going to happen in the change handler - what is it the code is meant to do?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you
You welcome!
.DataValueField = "internalCode"
by :
.DataValueField = "internalCode" + "|" + Process1
and use :
Open in new window