How do you apply sorting to a DataView in ADO.NET?
- By using the Sort property
- By using the Select method with an ORDER BY clause
- By using the Sort method
- By setting the OrderBy property
The correct option is option 3, By using the Sort method. The Sort method allows you to specify the column(s) and the sort order(s) for the DataView. This enables you to arrange the data in the desired sequence, facilitating easier data manipulation and presentation.
Loading...
Related Quiz
- What does EF stand for in the context of ADO.NET Entity Framework?
- ADO.NET allows you to represent a collection of related tables using a ___________.
- What are some advanced techniques for optimizing performance when working with hierarchical data and DataRelations?
- What is the difference between LINQ to SQL and LINQ to Entities?
- You want to retrieve a single value (e.g., the total number of records) from a SELECT statement. Which ADO.NET method would you use for this purpose?