ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.ASP.Net RadioButton TabIndex not working with GroupName<p>Hi <a class="username" rel="JennyD6856"> JennyD6856</a>,</p> <p>What you are seeing is normal. You can't&nbsp;tab between RadioButtons in the same group. As you tab, you will only focus on the currently selected one then move to the next control on the form (Ex: TextBox).</p> <p>The work around would be remove&nbsp;GroupName property from RadioButton, which means you have multiple groups each with one RadioButton. But then you lose the built in functionality that automatically deselects one RadioButton when you select the other.</p> <p>Your user will be able to select both RadioButtons, so you need to add some logic that disables the other on CheckedChanged events.</p> <p>I have implemented the same with an example to solve your issue.</p> <p>Place the RadioButton inside a Panel and loop through the RadioButtons and deselect the other ones.</p> <p>Check this example. Now please take its reference and correct your code.</p> <p><strong><span style="text-decoration: underline;">HTML</span></strong></p> <pre class="brush: html">&lt;asp:Panel runat=&#34;server&#34; ID=&#34;pnlGroupRadioButton&#34;&gt; &lt;asp:RadioButton ID=&#34;rdlaborhourly&#34; runat=&#34;server&#34; Text=&#34;Hourly&#34; Checked=&#34;true&#34; OnCheckedChanged=&#34;rdlaborhourly_CheckedChanged&#34; AutoPostBack=&#34;true&#34; TabIndex=&#34;1&#34; /&gt; &lt;asp:RadioButton ID=&#34;rdlaborsalary&#34; runat=&#34;server&#34; Text=&#34;Salary&#34; OnCheckedChanged=&#34;rdlaborsalary_CheckedChanged&#34; AutoPostBack=&#34;true&#34; TabIndex=&#34;2&#34; /&gt; &lt;asp:RadioButton ID=&#34;rdlabordaily&#34; runat=&#34;server&#34; Text=&#34;Daily&#34; OnCheckedChanged=&#34;rdlabordaily_CheckedChanged&#34; AutoPostBack=&#34;true&#34; TabIndex=&#34;3&#34; /&gt; &lt;/asp:Panel&gt;</pre> <p><strong><span style="text-decoration: underline;">Code</span></strong></p> <p><strong>C#</strong></p> <pre class="brush: csharp">protected void rdlaborhourly_CheckedChanged(object sender, EventArgs e) { SelectSingleRadio(sender as RadioButton); } protected void rdlaborsalary_CheckedChanged(object sender, EventArgs e) { SelectSingleRadio(sender as RadioButton); } protected void rdlabordaily_CheckedChanged(object sender, EventArgs e) { SelectSingleRadio(sender as RadioButton); } private void SelectSingleRadio(RadioButton radio) { foreach (RadioButton rb in pnlGroupRadioButton.Controls.OfType&lt;RadioButton&gt;()) { if (rb.ID != radio.ID) { rb.Checked = false; } } }</pre> <p><strong>VB.Net</strong></p> <pre class="brush: vb">Protected Sub rdlaborhourly_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) SelectSingleRadio(TryCast(sender, RadioButton)) End Sub Protected Sub rdlaborsalary_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) SelectSingleRadio(TryCast(sender, RadioButton)) End Sub Protected Sub rdlabordaily_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) SelectSingleRadio(TryCast(sender, RadioButton)) End Sub Private Sub SelectSingleRadio(ByVal radio As RadioButton) For Each rb As RadioButton In pnlGroupRadioButton.Controls.OfType(Of RadioButton)() If rb.ID &lt;&gt; radio.ID Then rb.Checked = False End If Next End Sub</pre> <p><strong><span style="text-decoration: underline;">Screenshot</span></strong></p> <p><img src="https://i.imgur.com/yB8RlGz.gif" alt="" width="236" height="57" /></p>https://www.aspforums.net:443/Threads/152321/ASPNet-RadioButton-TabIndex-not-working-with-GroupName/https://www.aspforums.net:443/Threads/152321/ASPNet-RadioButton-TabIndex-not-working-with-GroupName/Wed, 14 Aug 2019 01:24:29 GMT