0

c# で asp.net 4.0 を使用しています。aspxページにはデータリストがあり、次のような構造です

<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>

ここのデータリストでは、5 つのチェックボックスがバインドされ、3 つのラジオボタン ("rbBluetooth") がバインドされています。5 番目のチェックボックスの行はそのラジオ ボタンではありません。

解決策はありますか?

4

2 に答える 2

1

そのラジオボタンのセレクターを使用して、自分で解決しました。お気に入り

if ((/ClientDevice/.test(tabletDevice))) {
      $("input:radio[value=rbBluetooth] + label").css('display', 'none');
      $("input:radio[value=rbBluetooth]").css('display', 'none');
 }
于 2013-10-28T12:02:24.343 に答える