Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How do you sort the data in datagrid?

Answer Posted / sunil

In a simple method,

DataSet ds = new DataSet();
// you must populate the dataset
DataTable dt = ds.tables[0];
DataView dv = new DataView(dt);
dv.Sort = dt.Columns[0];
// This will sort first column in ascending
dv.Sort = dt.Columns[0] + " DESC";
// This will sort first column in descending

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is faster sqldataadapter and sqldatareader?

931


What are the benefits of ADO.NET?

1121


What are the main differences between classic ado and ado.net?

1023


What is the difference between statement and preparedstatement interface?

1000


describe the dataset object in ado.net.

959


What is the use of SqlCommandBuilder?

1209


What is two way data binding android?

989


What is dbcontext and dbset in entity framework?

938


Is it possible to edit data in Repeater control?

966


List the 4 common ado.net namespaces?

1173


What are the benefits of using of ADO.NET in .NET 4.0?

1075


Explain how to copy the contents from one table to another table and how to delete the source table in ado.net?

869


What are the objects of ado.net?

1074


Data reader read and forward only, how is it possible to get 2 tables of data at a time?

920


What is ado.net and its features?

984