



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The C# ADO.NET DataTable class and how to create, add data, and bind it to a DataGridView control. It also lists the common properties and methods of the DataTable class. Additionally, it discusses the advantages of XML, such as supporting Unicode, representing data structures, self-documenting format, and validation using schema languages.
Typology: Study notes
1 / 5
This page cannot be seen from the preview
Don't miss anything!
Data Table The DataTable class in C# ADO.NET is a database table representation and provides a collection of columns and rows to store data in a grid form. The code sample in this artilce explains how to create a DataTable at run-time in C#. You will also learn how to create a DataTable columns and rows, add data to a DataTable and bind a DataTable to a DataGridView control using data binding. Table 1 describes some of the common DataTable properties. Table 1: The Data Table class properties PROPERTY DESCRIPTION Columns Represents all table columns Constraints Represents all table constraints DataSet Returns the dataset for the table DefaultView Customized view of the data table ChildRelation Return child relations for the data table ParentRelation Returns parent relations for the data table PrimaryKey Represents an array of columns that function as primary key for the table Rows All rows of the data table TableName Name of the table
Table 2: The Data Table Class Methods METHOD DESCRIPTION AcceptChanges Commits all the changes made since last AcceptChanges was called Clear Deletes all data table data Clone Creates a clone of a DataTable including its schema Copy Copies a data table including its schema NewRow Creates a new row, which is later added by calling the Rows.Add method RejectChanges Reject all changed made after last AcceptChanges was called Reset Resets a data table's original state Select Gets an array of rows based on the criteria Advantages of XML 1) It supports Unicode, allowing almost any information in any written human language to be communicated.
Structure of an XML Document :-