Chcę zintegrować SimpleModal Moje ListView edit
działania tak, gdy użytkownik kliknij edit
, modalne okienko z danymi załadowany przez ajax
edytować formularz.Jak korzystać SimpleModal w ListView edycji akcji
mój prosty ListView:
<asp:ListView ID="lv_familyrelation" runat="server" ItemPlaceholderID="RelationContainer" >
<LayoutTemplate>
<fieldset id="FieldSet1">
<legend>Relations</legend>
<div class="container-fluid">
<div class="row">
<div class="col-lg-4">
Code
</div>
<div class="col-lg-4">
Name
</div>
<div class="col-lg-4">
</div>
</div>
<asp:PlaceHolder ID="RelationContainer" runat="server"></asp:PlaceHolder>
<br />
<br />
<asp:LinkButton ID="lbtnInitInsert" runat="server"
CssClass="btn btn-primary btn-md white_cr"><span class="glyphicon glyphicon-plus"></span> </asp:LinkButton>
</fieldset>
</LayoutTemplate>
<ItemTemplate>
<fieldset>
<div class="container-fluid">
<div class="row">
<div class="col-lg-4">
<%#Eval("RELATION_CODE")%>
</div>
<div class="col-lg-4">
<%#Eval("RELATION_NAME")%>
</div>
<div class="col-lg-4">
<asp:LinkButton ID="lbtn_edit" runat="server"
CssClass="btn btn-primary btn-md white_cr"><span class="glyphicon glyphicon-pencil"></span> </asp:LinkButton>
</div>
</div>
</div>
</fieldset>
</ItemTemplate>
</asp:ListView>
mój kod Bind:
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
lv_familyrelation.DataSource = GetRelation();
lv_familyrelation.DataBind();
}
}
Od FireBug:
<div>
<fieldset id="FieldSet1">
<legend>Relations</legend>
<br>
<a id="lv_familyrelation_lbtnInitInsert" class="btn btn-primary btn-md white_cr" href="javascript:__doPostBack('lv_familyrelation$lbtnInitInsert','')"><span class="glyphicon glyphicon-plus"></span> </a>
<br>
<br>
<div class="container-fluid">
<div class="row">
<div class="col-lg-4">
Code
</div>
<div class="col-lg-4">
Name
</div>
<div class="col-lg-4">
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-lg-4">
1
</div>
<div class="col-lg-4">
Mother
</div>
<div class="col-lg-4">
<a id="lv_familyrelation_lbtn_edit_0" class="btn btn-primary btn-md white_cr" href="javascript:__doPostBack('lv_familyrelation$ctrl0$lbtn_edit','')"><span class="glyphicon glyphicon-pencil"></span> </a>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-lg-4">
2
</div>
<div class="col-lg-4">
Father
</div>
<div class="col-lg-4">
<a id="lv_familyrelation_lbtn_edit_1" class="btn btn-primary btn-md white_cr" href="javascript:__doPostBack('lv_familyrelation$ctrl1$lbtn_edit','')"><span class="glyphicon glyphicon-pencil"></span> </a>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-lg-4">
3
</div>
<div class="col-lg-4">
Wife
</div>
<div class="col-lg-4">
<a id="lv_familyrelation_lbtn_edit_2" class="btn btn-primary btn-md white_cr" href="javascript:__doPostBack('lv_familyrelation$ctrl2$lbtn_edit','')"><span class="glyphicon glyphicon-pencil"></span> </a>
</div>
</div>
</div>
</div>
</div>
</fieldset>
</div>
@AnynameDonotcare proszę dodać swój kod również Listview wiążące – Webruster