DataTable object of DataSet

How rows can be added or deleted from the DataTable object of DataSet?

E

Expert

Verified

The DataRowCollection class defines the gathering of the rows for DataTable object in a DataSet. The DataTable class offers the NewRow() method in order to add a new DataRow to DataTable. The NewRow method creates a new row that implements same schema as applied to the DataTable.

The following are the methods provided by the DataRowCollection object:

a) Add() -  It adds a new row to the DataRowCollection.

b) Remove()-  It removes a DataRow object from DataRowCollection.

c) RemoveAt() – It eliminates a row whose location is specified by an index number.

   Related Questions in DOT NET Programming

©TutorsGlobe All rights reserved 2022-2023.