.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani

Home >> Forum >> VB.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Datagrid sorting

Posted By: thushara     Posted Date: January 17, 2011    Points:2   Category :VB.Net
I have a datagrid that has a Datatable as its DataSource. Now I enter the rows in the datagrid. Now if I want to rearrange the rows in some order what should I do??

For eg. Now my 10th row I want to move to the 4th position or my 12th row to 5 th position.



Currently I am trying by having a Button which when I click should move the selected row in the grid one place on top but not successful yet,

I there any way to do this by using UP & Down button


Responses
Author: Amit Mehra             
Posted Date: January 30, 2011     Points: 5   

Hi,

Is it asp.net for windows form application?

Thanks,
Amit
Please "Mark As Answer " if this post help you.
Author: Blessy Baby             
Posted Date: February 02, 2011     Points: 5   

Hi,

In datagrid you can set the sort expression and write the code in .cs file. Please see the link below for more information
http://www.codeproject.com/KB/webforms/SortingDataGridColumns.aspx

Blessy Baby
Project Lead
Digitalmesh Softech India (p) Limited
Cochin,Kerala


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend