Question

I am using asp.net 4.0 with c#. In aspx page a data list is there.and it's structure like

<asp:DataList ID="dlKit" runat="server">
<HeaderTemplate>
....
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>....</td>
<td>
 <asp:CheckBox ID="chkDevice" runat="server" Checked="true" onclick="javascript:SelectRBTN(this);"/>
                                        <%--   Enabled='<%# !Eval("DeviceType").Equals(KitDeviceType.ClientDevice.ToString())%>' --%>
                                        &nbsp;&nbsp;
                                        <asp:RadioButton ID="rbManual" runat="server" Checked="true" Text="Manual" GroupName="Kitting"
                                            Visible='<%# !Eval("DeviceType").Equals(KitDeviceType.ClientDevice.ToString())%>'
                                            onClick="javascript:radioChanged(this);" />

                                        <asp:RadioButton ID="rbBluetooth" runat="server" Text="Bluetooth" GroupName="Kitting"
                                            Visible='<%# !Eval("DeviceType").Equals(KitDeviceType.ClientDevice.ToString()) && !Eval("DeviceType_Name").Equals("Glucometer")%>'
                                            onClick="javascript:radioChanged(this);" />
</td>
</tr>
</ItemTemplate>
</asp:DataList>

Here in data list,5 checkbox bound and 3 radiobutton("rbBluetooth") bound. 5th checkbox's row not that radio button.When i checked or unchecked 5th checkbox i want to get all 3 radiobutton("rbBluetooth") due to visible/disable on that checkbox's ckecked condition.

Any Solution?

Was it helpful?

Solution

I resolved by my self using selector for that radio button. like

if ((/ClientDevice/.test(tabletDevice))) {
      $("input:radio[value=rbBluetooth] + label").css('display', 'none');
      $("input:radio[value=rbBluetooth]").css('display', 'none');
 }

OTHER TIPS

Find like this

$('input:radio[id$="rbManual"]')
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top