hello,
this code works fine and on load event it creates 10 rows in list.
i want when user click on delete button inside listview row so that row should be deleted wihtout effect othere rows and when user click on add new row button so its add up new row in sama data table without effecting others
so if user has fill any data above so it should maintain please advice
System.Data.DataTable dt = new System.Data.DataTable();
dt.Columns.AddRange(new System.Data.DataColumn[] { new System.Data.DataColumn("ID", typeof(int)) });
for (int i = 0; i < 10; i++)
{
dt.Rows.Add(i);
}
this.ListView1.DataSource = dt;
this.ListView1.DataBind();
<asp:ListView ID="ListView1" runat="server" OnItemCommand="ListView1_ItemCommand">
<ItemTemplate>
<div class="pickup">
<asp:LinkButton ID="LinkButton1" CommandName="checkrow" runat="server">Delete This Row</asp:LinkButton>
Id :
<asp:Label ID="Label1" runat="server" Text='<%# Eval("ID") %>'></asp:Label>
A:
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
B:
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</div>
</ItemTemplate>
</asp:ListView>
<asp:LinkButton ID="LinkButton2" runat="server" >Add More Rows</asp:LinkButton>