---
title: "Dataview in ADO.Net"  
description: "A dataview enables you to create different views of the data stored in a DataTable, a capability that is often used in data-binding applications. Usin"  
author: "Amit Singh"  
published: 2011-05-05  
updated: 2014-09-18  
canonical: https://www.mindstick.com/blog/151/dataview-in-ado-dot-net  
category: "ado.net"  
tags: ["ado.net"]  
reading_time: 1 minute  

---

# Dataview in ADO.Net

A [dataview](https://www.mindstick.com/forum/1455/how-to-filter-a-dataview) enables you to create different views of the [data stored](https://www.mindstick.com/forum/33481/in-objective-c-how-to-dump-data-stored-obj-c-object) in a [DataTable](https://www.mindstick.com/blog/195/datatable-in-ado-dot-net), a capability that is often used in data-binding applications. Using a 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](https://www.mindstick.com/interview/1160/explain-about-filter-expression).\

Dataview provides a dynamic view for a datatable. Using dataview we can perform following [operation](https://www.mindstick.com/forum/33917/how-to-callback-operation-using-delegate-in-c-sharp):

· [Sorting](https://www.mindstick.com/articles/1581/sorting-list-with-side-bar) the table

· Add, modify, [delete the data](https://www.mindstick.com/forum/371/how-to-insert-update-delete-the-data-from-grid-view-data-to-database)

· [Filtering data](https://www.mindstick.com/forum/160900/how-to-use-searching-and-filtering-data-in-an-sql-server) from table

##### Example:

Creating Dataview object as

Dataview dv=new Dataview();

How to use Sort [property](https://www.mindstick.com/blog/205/property-notification-in-c-sharp) of Dataview

DataView dv = DataTable1.DefaultView;

dv.Sort = "[username](https://www.mindstick.com/forum/12798/there-is-no-viewdata-item-of-type-ienumerable-selectlistitem-that-has-the-key-username), email DESC";

##### Filtering in Dataview

DataView dv = new DataView(datatable1,"joindate >= 01/01/2010", DataView

RowState.CurrentRows);

---

Original Source: https://www.mindstick.com/blog/151/dataview-in-ado-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
