c# - Repeater Inside ModalPopup extender -
i having repeater displayed inside modal popup extender,i able bind values , works fine,but when popup showing up,it doesn't show repeater.
here code:
<div id="dummy" runat="server"> </div> <ajaxtoolkit:modalpopupextender runat="server" id="mpeoir" targetcontrolid="dummy" popupcontrolid="pnloir_view" dropshadow="true" cancelcontrolid="btn_modal_cancel" /> <asp:panel id="pnloir_view" runat="server" backcolor="whitesmoke" height="600px" width="600px" style="display: none"> <div class="titl-bg" style="width: 580px;"> <div class="cont-title" style="width: 580px;"> list of oir created </div> </div> <div id="rpt"> <table cellpadding="0" cellspacing="0"> <asp:repeater id="rptr_oir_view" runat="server" onitemcommand="rptr_oir_itemcommand" onitemdatabound="rptr_oir_itemdatabound"> <headertemplate> <tr> <th> oir no </th> <th> incident date </th> <th> employee name </th> <th> age </th> <th> department name </th> <th> injury location </th> <th> view </th> </tr> </headertemplate> <itemtemplate> <tr> <td> <%# eval("oir_no")%> </td> <td> <%# eval("incident_date")%> </td> <td> <%# eval("firstname")%> </td> <td> <%# eval("departmentname")%> </td> <td> <%# eval("locationname")%> </td> <td> <asp:imagebutton id="imgbtn_oir_view" runat="server" commandname="view" causesvalidation="false" imageurl="~/images/download_arrow.png" width="20px" height="20px" commandargument='<%# eval("oir_no")%>' /> </td> </tr> </itemtemplate> </asp:repeater> </table> </div> </asp:panel>
and here have done show popup:
protected void reportercancelclick(object sender, eventargs e) { using (ehsimsdatacontext db = new ehsimsdatacontext()) { var _oir_view = (from oir in db.occupational_injury_reports join e in db.employees on oir.employee_id equals e.employee_id join d in db.departments on oir.department_id equals d.department_id join l in db.locations on oir.injury_location_id equals l.location_id select new { oir.oir_no, oir.incident_date, e.firstname, departmentname= d.name, locationname= l.name }).tolist(); rptr_oir_view.datasource = _oir_view; rptr_oir_view.databind(); mpeoir.show(); } }
Comments
Post a Comment