how can you add or remove rows from the datatable


How can you add or remove rows from the DataTable object of DataSet?

The DataRowCollection class explains the collection of rows for the DataTable object in a DataSet. The DataTable class gives the NewRow() method to add a new DataRow to DataTable. The NewRow method creates a new row, which executes the same schema as applied to the DataTable. The following are the methods provided by the DataRowCollection object:

 Add() - Adds a new row to DataRowCollection.

Remove()- Removes a DataRow object from DataRowCollection.

RemoveAt() - Removes a row whose location is specified by an index number.

 

Request for Solution File

Ask an Expert for Answer!!
DOT NET Programming: how can you add or remove rows from the datatable
Reference No:- TGS0311125

Expected delivery within 24 Hours