show-notice
hide-notice

Wednesday, 26 June 2013

C# - Delete Particular Row from Datatable | Delete Selected Row From DataTable in Asp.net


Introduction

Here I will explain how to delete particular row from datatable or delete selected rows from datatable in asp.net using C# and


We can delete datatable rows by using delete method for that check below code
C# Code

DataTable dt1 = new DataTable();
dt1 = ds.Tables[0];
for (int i = 0; i < dt.Columns.Count;i++ )
{
if (i == 3)
{
dt.Rows[i - 1].Delete();
dt.AcceptChanges();
}
}
VB.NET Code

SHARE THIS POST   

0 comments :

Post a Comment

Design by Gohilinfotech | www.gohilinfotech.blogspot.com