Removing rows from a DataTable object of DataSet

By which method we can add or remove rows from a DataTable object of DataSet?

E

Expert

Verified

DataRowCollection class defines a collection of the rows for DataTable object in the DataSet. DataTable class make available a NewRow() method to add the new DataRow to a DataTable. NewRow method produces the new row that implements a same schema which is applied to a DataTable.

The methods which are provided by DataRowCollection object are as follows:

• RemoveAt() – It removes the row whose location is specified with the index number.
• Remove()- It removes the DataRow object from the DataRowCollection.
• Add() – It adds the new row to the DataRowCollection.

   Related Questions in DOT NET Programming

©TutorsGlobe All rights reserved 2022-2023.