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

How to work with disconnected data - the dataset and sqldataadapter?

982


What is method to get XML and schema from Dataset? getXML() and get Schema ()

971


Which is the feature of ado.net?

1009


List the 4 common ado.net namespaces?

1162


What is microsoft ado.net?

1142


What is the difference between Optimistic and Pessimistic locking?

977


What connected data?

954


What are good ado.net object to replace to ado recordset object.

1120


What is the difference between Datareader and Dataset?

1079


List all the steps in order, to access a database through ado.net?

1078


Why edit is not possible in repeater?

944


What are advantages of microsoft-provided data provider classes in ado.net?

999


differance between ADO vs ADO.Net?

1060


What are the different methods by which we can populate a dataset?

1229


Can we create Synonymns in MS Acess,My Sql Server,Sql Server? But iam we can create in oracle!

2137