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 to sort the data in Datatable

Answer Posted / kamalakannan.a

I think the above answer is correct.Another one method is

DataTable dt=new DataTable();
DataRow[] dr=dt.Select("Filter Expression","Sort
expression");

Here Sort expression is , for eg.Address is one of the
field in dt.

Then DataRow[] dr=dt.Select("","Address ASC");

But in this method is have the Datarow array.So you can use
another one method,I explain below.

DataView dv=new DataView(Datatable,Filter Exp,Sort
Exp,Dataviewrowstate)


Eg is

DataView dv=new DataView(dt,"","Address
ASC,DataViewVowState.CurrentRows);


Here we can copy this Dataview to datatable or use this
same dataview instead of datatable.

Kamal....

Is This Answer Correct ?    28 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which object is used to add relationship between two Datatables?

1041


Which architecture does Datasets follow?

1035


If a table contains 20000 records. In a page at each time 100 records to be displayed.

886


Describe the command object and its method.

996


Why do we use sqldataadapter?

947


Explain executenonquery?

1126


What are the essential features of ado.net?

947


Define Execute Scalar?

1010


How would you connect to a database by using .NET?

935


Name which operations can you not perform on an ado.net dataset?

983


Which database is the ado.net sql connection object designed for?

1036


What is untyped dataset?

1092


Explain how to call the sql commands asynchronously in ado.net version 2.0?

927


What is basic use of data view?

998


What is Data view?

1067