var row = $(this).closest('tr'); var ID = row.find("td:first").text(); $("#<%=TextBox12.ClientID%>").val(ID);
I have used this for displaying the gridview value in the textbox but this is not working for the dropdownlist.
Aashish682 says: var DriverID = row.find("td:nth-child(12)").text(); $("#<%=DropDownList4.ClientID%>").val(DriverID);
var
DriverID = row.find(
"td:nth-child(12)"
).text();
$(
"#<%=DropDownList4.ClientID%>"
).val(DriverID);
this is right code just cross check by debugging whether you are getting proper DriverID if yes then you might not be having any issue.
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.