私のプロジェクトでは、しばらくの間何かを試してきました。ユーザーは選択からグループを選択する必要があります。このAddボタンはaspリピータを実行するので、グループをリストすることができます。グループ行には2つのボタンがあります。右のグループはグループを取り消し、左のグループは動的なdivを開きます。 (あなたが見ることができるように)私は動的にIDを設定するので、いくつかのJavascriptの作品があります。 ここまでは大丈夫です。ここで、ユーザーが固定質問をチェックしたい場合は、そのグループ内の質問を表示する必要があります。ユーザーはグループ内で質問を動的に追加できる必要があります。私はGridViewを使用しようとしましたが、私は処理できませんでした。だから助言?ここでダイナミックリピータ(Asp.Net)のデータを動的に表示
は私が何をしたいです:
<ul>
<asp:Repeater ID="GroupRepeater" runat="server">
<ItemTemplate>
<li class="groupli">
<div style="width:100%; float:left; margin-top:2%;">
<h3 style="display:block; float:left; width:auto;"><%# Container.ItemIndex+1 %>.<%# Eval("QuestGroup")%></h3>
<asp:Button CssClass="GroupLiButtonD" OnClick="RemoveGroup" CommandArgument='<%# Eval("QuestGroup") %>' ID="DeleteGroupBtn" runat="server"/>
<button type="button" onclick="ShowQuestArea('<%# Container.ItemIndex+1 %>_div')" class="GroupLiButtonA"></button>
</div>
<div id='<%# Container.ItemIndex+1 %>_div' style="width:100%; margin-left:3%; float:left; display:none;">
<div class="questarea">
<div style="width:100%; margin-top:1%;">
<h4 style="display:block; float:left; width:200px;">Add Fixed Question</h4>
<input name='check_<%# Container.ItemIndex+1 %>' id='fixcheck_<%# Container.ItemIndex+1 %>' onchange="FixedCheck('fixcheck_<%# Container.ItemIndex+1 %>','<%# Container.ItemIndex+1 %>')" type="radio" />
</div>
<div id="fixarea_<%# Container.ItemIndex+1 %>" class="subarea"> <%--fixedquestion view start tag--%>
</div> <%--fixedquestion view end tag--%>
<div style="width:100%; margin-top:1%;">
<h4 style="display:block; float:left; width:200px;">Add Random Question</h4>
<input name='check_<%# Container.ItemIndex+1 %>' id='randomcheck_<%# Container.ItemIndex+1 %>' onchange="RandomCheck('randomcheck_<%# Container.ItemIndex+1 %>','<%# Container.ItemIndex+1 %>')" type="radio" />
<div id="randomarea_<%# Container.ItemIndex+1 %>" class="subarea">
<div style="margin-top:1%;">
<p style="color:black; float:left;">Number of Random Questions:</p><input type="number" max="20" min="0" style="width:20px; float:left;" />
<button>Add</button>
</div>
</div>
</div>
</div>
</div>
</li>
</ItemTemplate>
</asp:Repeater>
</ul
私のコードは複雑に見えるかもしれません。私はイメージを追加しました。だからあなたは助言を与えるために私のコードを無視することができます。ありがとうございました。