嗨,我目前正在尝试找到一种方法,无论何时我单击表上的“编辑”按钮都可以显示模态。这是我的前端代码:
<div class="col-sm-3"></div>
<div class=" row col-sm-6 panel-body">
<asp:DataGrid CssClass=" table table-borderless" OnItemCommand="PO_Form_ItemCommand" ID="PO_Form" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:ButtonColumn ButtonType="LinkButton" Text="Edit" CommandName="grdEdit"></asp:ButtonColumn>
<asp:ButtonColumn ButtonType="LinkButton" Text="Delete" CommandName="grdDel"></asp:ButtonColumn>
<asp:BoundColumn DataField="PO_no" HeaderText="PO No." />
<asp:BoundColumn DataField="supplier_name" HeaderText="Supplier name" />
<asp:BoundColumn DataField="flight_no" HeaderText="Flight No." />
<asp:BoundColumn DataField="bkg_date" HeaderText="Booking Date" />
<asp:BoundColumn DataField="status" HeaderText="Status" />
</Columns>
<HeaderStyle BackColor="#666666" />
</asp:DataGrid>
</div>
<%-- Modal top --%>
<div id="editmodal" class="modal" runat="server" role="dialog">
<div class="modal-dialog">
<%-- Modal Content --%>
<div class="modal-content">
<div class="modal-content">
<button type="button" class="btn btn-default" data-dismiss="modal">×</button>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"></button>
</div>
</div>
</div>
</div>
<%-- Modal Bottom --%>
如果有人了解我的情况,那将真的很有帮助。谢谢。