To remove all listview items use the clear method
For example:
listView1.Clear();
will empty the listview
Visual Studio .NET Tips and Tricks, VB.NET Code Samples, C# Code Snippets, ASP.NET Code Samples, .NET Tips and Tricks, C# Tips & Tricks, Visual Studio 2010, .NET Framework Code Samples, VB.NET Tips & Tricks
To remove all listview items use the clear method
For example:
listView1.Clear();
will empty the listview
void BindData()
ReplyDelete{
string[] Keys = new string[1];
Keys[0] = "IDOWNLOADID";
LvDownloads.DataKeyNames = Keys;
LvDownloads.DataSource = ObjDownloadBL.GetDownloads();
LvDownloads.DataBind();
}
protected void LvDownloads_ItemDeleting(object sender, ListViewDeleteEventArgs e)
{
//string DownloadId = int.Parse(e.CommandArgument.ToString());
ObjDownloadCon.IDOWNLOADID = int.Parse(this.LvDownloads.DataKeys[e.ItemIndex].Value.ToString());
ObjDownloadCon.sptype = "Delete";
ObjDownloadBL.Tbl_Download_Save_Update(ObjDownloadCon);
BindData();
}