本文介绍了如何重复在gridview的itemtemplate中具有进度栏的div标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个gridview,其中我使用div重复了课程名称和Progressbar.我已经从链接http://jqueryui.com/demos/progressbar/
使用了jquery
我希望每次在内部网格中重复课程名称时都重复jquery进度条,但是由于某种原因jquery进度条只会被拾取一次.Progressbar只显示一次.
请帮忙
谢谢,
耶稣
如果您愿意,请参考代码.这个div标签是个问题.
I have a gridview, in which i repeat coursenames and Progressbar using div. I have used the jquery from the link http://jqueryui.com/demos/progressbar/
I want the jquery progressbar to be repeated everytime a Coursename gets repeated in the inside grid but for some reason the jquery Progressbar only get picked up once.Progressbar is displayed only once.
Please help
Thanks,
Jesu
If you wish please refer the code. this div tag is a problem.
<div style="width: 20%; text-align: center">
<div id="progressbar">
</div>
</div>
<asp:GridView ID="gvCourse" runat="server" AutoGenerateColumns="False" AllowPaging="True"
SkinID="gv3" PageSize="2" AllowSorting="True" BorderStyle="Dotted" OnPageIndexChanging="gvCourseList_PageIndexChanging">
<Columns>
<asp:TemplateField HeaderText="Enrolled Course List" HeaderStyle-CssClass="mpeCaption">
<ItemTemplate>
<div class="content_inner floatLeft">
<div class="box-content floatLeft">
<div class="inside floatLeft">
<div class="list_box_learner_page floatLeft">
<div class="list_box_des_learner_page floatLeft">
<div>
<div class="c_itemtxt">
<p>
<span class="bold">
<asp:Label ID="Label1" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "CourseName")%>'></asp:Label>
</span>
</p>
<p>
Completion Status
</p>
<p>
<span>
<div style="width: 20%; text-align: center">
<div id="progressbar">
</div>
</div>
</span>
</p>
<p>
</p>
<p style="padding: 5px 2px 10px 0px;">
<asp:Button ID="Button3" CssClass="NormalButton" runat="server" Text="View Course Content" />
</p>
<p>
<asp:Button ID="Button4" CssClass="CancelButton" runat="server" Text="Cancel Enrollment" />
</p>
<p>
<span class="">Note: Your One-on-One sessions will be closed on</span>
<asp:Label ID="Label5" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "SessionEndDate")%>'></asp:Label>
<asp:Button ID="btnViewSchedule" runat="server" CssClass="NormalButton" Text="View Schedule"
OnClick="btnViewSchedule_Click" />
</p>
</div>
<div class="fr_itemimg">
<p>
<span class="">Course end date</span>
<asp:Label ID="Label2" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "CourseEndDate")%>'></asp:Label></p>
<p>
<span>One-on-One Sessions</span><span class="sp3"> </span>
</p>
<p>
<div style="width: 60%; text-align: center">
<div id="progressbar1">
</div>
</div>
</p>
<p>
<asp:Label ID="Label4" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "InteractionHours")%>'></asp:Label><span>/150
Hours completed</span><span class="sp3"> </span>
</p>
<p>
<asp:Button ID="Button2" CssClass="GlobalOrangeButton" runat="server" Text="Connect to teacher" />
</p>
<p>
<asp:Label ID="Label3" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "NoofTrainers")%>'></asp:Label><span>
Trainers Available</span><span class="sp3"> </span>
</p>
<p>
<span>This session ends on</span>
<asp:Label ID="Label6" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "SessionEndTime")%>'></asp:Label><span
class="sp3"></span></p>
</div>
<div class="dvClear">
</div>
<p class="rule">
</p>
</div>
</div>
</div>
</div>
<div class="tr">
</div>
<div class="tl">
</div>
<div class="br">
</div>
<div class="bl">
</div>
</div>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<PagerStyle HorizontalAlign="Right" />
</asp:GridView>
推荐答案
这篇关于如何重复在gridview的itemtemplate中具有进度栏的div标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!