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
Dim dt1 As New DataTable()
dt1 = ds.Tables(0)
For i As Integer = 0 To dt.Columns.Count - 1
If i = 3 Then
dt.Rows(i - 1).Delete()
dt.AcceptChanges()
End If
Next
Mr Lokesh Kumar Gupta,
ReplyDeleteYou are writing articles just copying and pasting articles from www.aspdotnet-suresh.com remove all the articles whatever you copy and paste otherwise i will give compalint on you with DMCA Notice
Thanks sir for telling my mistake. i really sorry.
ReplyDeleteproblem now with me is that i forgot my sign in credentials to remove these blog post as well as remove this whole blog.
So you will never final any your article on here.
I really sorry for my mistake.