Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
How to sort DataTable?
November 15, 2009
How to sort datatable in asp.net. I have a DataTable and the data is bind from SQL Server and inned to sort the datatable.
Posted Date: November 15, 2009 Points: 5
u can use sql Query OrderBy
Select * from TableName OrderBy CloumnName Desc/Asc
Posted Date: November 17, 2009 Points: 5
please read the following...
Posted Date: November 19, 2009 Points: 5
you can try :
Dim dt As New DataTable
dt.DefaultView.Sort = "ColName"
'Columns are sorted asending by default
'if you want to sort in descending order than you can try :
dt.DefaultView.Sort = "ColName DESC"
To post reply
Related Questions Related Questions
bind xml file data into datatable
Sort items in combobox or dropdownlist in Asp.net
ASP.NET - Datagrid with Display, Edit, Delete and Sort functionalities
Datatable to word
Binding textbox value to a column in datatable in asp.net
How to make datatable from another
Sort HashTables using C#
how to remove duplicate records from a datatable
Query against datatable using c#
How to add a column in a datatable dynamically....
Latest Forum Questions From The Same Category
Sql Bulk Insert from multiple delimited Textfile using c#.net
Read *.ds file to Dataset Object
TNS:address already in use Exception
Accessing Virtual folder
Dynamically Insert single record into MS access from SQL server
Deleting records from database while deselecting checkbox in gridview
How to generate script to export Database programmatically
Abstact and Interface Class
How to ingnore by default value of comboboxes?
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend