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


Top 5 Contributors of the Month
david stephan

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

Sorting in GridView using xml data in DataField

Posted By: Sathakkathul Haq     Posted Date: October 20, 2010    Points:2   Category :ASP.Net
I need to sort the Gridview by using xmlDataSource.

Please help out.

Thanks

Responses
Author: Sajid P K             
Posted Date: October 21, 2010     Points: 5   

Haq,

Below Link May help you...


http://forums.asp.net/t/1060641.aspx


Regards,
Sajid P K


Author: Santosh             
Posted Date: October 22, 2010     Points: 5   

hi
first u need to bind the dataset using xmldatareader
after that just write below code
code to sort the gridview in run-time
Dim MyDataView As New DataView
MyDataView = ds.Tables(0).DefaultView 'ds is dataset u need to bind first
MyDataView.Sort = "SortColumnName"
'SortColumnName is the name of the columnName of DataGridView you want to sort.
DGVFindList.DataSource = MyDataView 'DGVFindList is GridView Name

Regards
Santosh




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