What is the purpose of the "DataSource" property in DataGrid or DataGridView controls?
- Binds the control to a data source such as a DataTable or DataSet
- Defines the font style for the control
- Sets the background color of the control
- Specifies the width of the control
The "DataSource" property is used to bind the DataGrid or DataGridView control to a data source such as a DataTable or DataSet. This allows the control to display data from the specified source. By setting this property, you establish the connection between the control and the data it should display.
Loading...
Related Quiz
- ADO.NET allows you to work with which types of data sources?
- In LINQ to Entities, what does "Entities" refer to?
- What are the potential issues or challenges that may arise when using connection pooling?
- How do you apply sorting to a DataView in ADO.NET?
- To retrieve different data types from a data reader, you can use the _______ method.