1
我使用asp.net。我在頁面上有3個嵌套的datalist。內部datalist,有ckeckboxes。我看起來像下面。在數據列表中檢查複選框
我dalist的設計是象下面這樣:
<asp:DataList ID="grdRubrikKazanimlari" runat="server"
OnItemDataBound="grdRubrikKazanimlari_OnItemDataBound"
CssClass="grdRubrikKazanimlari" >
<ItemTemplate>
<div style="width:100%;display:block;">
<asp:Label ID="lblDegTipIliskiID" runat="server" Visible="false" Text='<%# DataBinder.Eval(Container.DataItem, "DegTipIliskiID")%>'></asp:Label>
<asp:Label ID="lblDegerlendirmeTipiID" runat="server" Visible="false" Text='<%# DataBinder.Eval(Container.DataItem, "DegerlendirmeTipiID")%>'></asp:Label>
<h1>
<asp:Label ID="lblDegerlendirmeTipi" runat="server" Text=""><%# DataBinder.Eval(Container.DataItem, "DegerlendirmeTipi")%></asp:Label>
</h1>
<asp:DataList ID="grdRubrikKazanimGrup" runat="server" OnItemDataBound="grdRubrikKazanimGrup_OnItemDataBound" CssClass="grdRubrikKazanimGrup">
<ItemTemplate>
<div style="width:96%;display:block;margin-left:5px;">
<asp:Label ID="lblAltGrupIliskiID" runat="server" Visible="false" Text='<%# DataBinder.Eval(Container.DataItem, "AltGrupIliskiID")%>'></asp:Label>
<h2>
<asp:Label ID="lblDegerlendirmeTipi" runat="server" Text=""><%# DataBinder.Eval(Container.DataItem, "AltGrup")%></asp:Label>
</h2>
<asp:DataList ID="grdRubrikKazanimlar" runat="server" OnItemDataBound="grdRubrikKazanimlar_OnItemDataBound" CssClass="grdRubrikKazanimlar" >
<HeaderTemplate>
<table style="width:100%;">
<tr style="line-height:25px;">
<td style="width:70%;text-align:left;padding-left:12px;font-weight:bold;">Kazanım Açıklaması</td>
<td style="width:15%;background-color:#91c98f;text-align:center">T.Edinilmiş</td>
<td style="width:15%;background-color:#bf6f86;text-align:center">T.Edinilmemiş</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblRubrikKazanimID" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "RubrikKazanimID")%>' Visible="false"></asp:Label>
<table style="width:100%;" id="tblkazanim">
<tr style="height:50px;vertical-align:middle;">
<td style="width:70%;text-align:left;padding-left:12px;">
<li>
<asp:Label ID="lblDegerlendirmeTipi" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "KazanimAciklama")%>'></asp:Label>
</li>
</td>
<td style="width:15%;background-color:#91c98f;text-align:center;vertical-align:middle;">
<asp:CheckBox ID="chkSeciliMi" runat="server" align="center" CssClass="chsecili" OnCheckedChanged="chkSeciliMi_CheckChanged" AutoPostBack="true" />
</td>
<td style="width:15%;background-color:#bf6f86;text-align:center;vertical-align:middle;">
<asp:CheckBox ID="chkYarimSeciliMi" runat="server" AutoPostBack="true" OnCheckedChanged="chkYarimSeciliMi_CheckChanged" CssClass="chkYarimSeciliMi"/>
</td>
</tr>
</table>
<div style="width:96%;display:block;">
<asp:Label ID="lblDegTipIliskiID" runat="server" Text="" Visible="false"></asp:Label>
<asp:Label ID="lblDegerlendirmeTipiID" runat="server" Text="" Visible="false"></asp:Label>
<asp:Label ID="lblKazanimDegerlendirmeTipiID" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "DegTipIliskiID")%>' Visible="false"></asp:Label>
<asp:Label ID="lblKazanimSirasi" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Sirasi")%>' Visible="false"></asp:Label>
</div>
</ItemTemplate>
</asp:DataList>
</div>
</ItemTemplate>
</asp:DataList>
</div>
</ItemTemplate>
</asp:DataList>
我希望用戶只檢查一個水平線上的複選框。我該如何使用jQuery來做到這一點。 謝謝。