ASP.NET does not allow you to place a radio button in a gridview row and have only a single radio button selected at a time.
I came across this post that solved by problem.
http://www.dotnetlearners.com/blogs/view/216/allow-only-single-radio-button-selection-in-aspnet-gridview.aspx
It uses this javascript function to change the other selected value:
<script language="javascript">
function singleRbtnSelect(chb) {
$(chb).closest("table").find("input:radio").prop("checked", false);
$(chb).prop("checked", true);
}
</script>
My professional notes on programming. Included in my notes are discussions on VB.NET, Microsoft Office, and some C#. I am just starting to learn about C# so as I learn more I will add more.
Wednesday, November 23, 2016
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment