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

What is a datagridview?

970


Which is faster ado.net or linq?

955


What is ole in excel?

900


Describe datareader object of ado.net with example.

873


What is the use of sqldatareader class?

939


What are basic methods of dataadapter?

929


What are the Data providers in ADO.Net?

956


What is linq and entity framework?

941


What is ado circle?

1085


Give an example of a .net application which connects to microsoft access database using ado.net classes.

1078


What is ole db and odbc?

859


Explain how to find the given query is optimised one or not?

951


Explain the various objects in dataset.

937


Difference between sqlcommand and sqlcommandbuilder?

1055


Explian About DataAdapters

971