How can we add/remove row’s in “DataTable” object of “DataSet”

Q

How can we add/remove row’s in “DataTable” object of “DataSet” ?

✍: Guest

A

“Datatable” provides “NewRow” method to add new row to “DataTable”. “DataTable” has “DataRowCollection” object which has all rows in a “DataTable” object. Following are the methods provided by “DataRowCollection” object
Add
Adds a new row in DataTable
Remove
It removes a “DataRow” object from “DataTable”
RemoveAt
It removes a “DataRow” object from “DataTable” depending on index position of the “DataTable”.

2007-10-24, 4965👍, 0💬