I have a RadGrid which produces the following html (hidden ID changes per row):
<input id="hiddenID" type="hidden" value="c6be9aaf-fc2b-441b-886e-120cfd6a73ee5" name="gvClaimDtSentDate$ctl00$ctl18$Detail50$ctl04$hiddenID">
<a id="c6be9aaf-fc2b-441b-886e-120cfd6a73ee" class="viewBtn" href="#">View</a>
<a class="orderBtn" id="lnkOrder" href="#">My Order</a>
I want to get the hidden ID of a raw on click of lnkOrder. so I have done below but it doesn’t work as it gives me the static/same id for each row:
$('.orderBtn').click(function() {
var tr = $("#<%=gvDtSentDate.ClientID%> tr");
var id = tr.find("input[name$=hiddenID]").val();
Can someone help please.
Try this: