1.

Which methods are provided to add or remove rows from the DataTable object?

Answer»

The collection of rows for the DATATABLE object has been defined by the DataRowCollection class. DataRowCollection class has the method NewRow() for adding a NEW DataRow to DataTable. This method creates a new row that implements the similar SCHEMA that is applied to the DataTable.

The methods provided by the DataRowCollection object are given below:

  • Add()- It adds a NEWLY created row into DataRowCollection.
  • Remove()- It deletes the object DataRow from DataRowCollection.
  • RemoveAt()- It deletes a row for which location is marked by an index number.


Discussion

No Comment Found