Explain how to filter and sort data with the DataView component.1. With DataView, you can expose the data in a table with different sort orders, and you can filter the data by row state or based on a filter expression. 2. DataTable.DefaultView Property is the DataView associated with a DataTable which can be used to sort and filter. 3. The DataView.RowFilter Property gets or sets the expression used to filter rows. 4. The RowFilter is conditioned against a value e.g.: "Name = 'John'" 5. After setting the RowFilter property, all rows that don’t match the condition are hidden by ADO.Net. 6. The Sort property expects a sort string to perform sorting. e.g.: "Name ASC, Age DESC", where Name and Age are 2 columns.
|