Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# remove rows from datatable

for(int i = dtPerson.Rows.Count-1; i >= 0; i--)
{
    DataRow dr = dtPerson.Rows[i];
    if (dr["name"] == "Joe")
        dr.Delete();
}
dtPerson.AcceptChanges();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #rows #datatable
ADD COMMENT
Topic
Name
5+5 =