TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
James Looi
NA
2
4.1k
How to sort the xml in datatable?
Feb 23 2012 12:00 PM
Hi
I have xml file and try to load into datagridview, how can I save the xml after I sort it by desc?
Private Sub frmTesting_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
DS.ReadXml(Application.StartupPath & "\user.xml")
Dim DS As New DataSet
If DS.Tables(0).Rows.Count = 0 Then
MsgBox("nothing")
Else
Dim i As Integer = 0
For Each r As DataRow In DS.Tables(0).Rows
dtgUser.Rows.Insert(i, r("ID"), r("Name"))
i = i + 1
Next
End If
dtgUser.Sort(dtgUser.Columns("ID"), System.ComponentModel.ListSortDirection.Ascending)
End Sub
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
DS.WriteXml(Application.StartupPath & "\user.xml")
End Sub
Reply
Answers (
1
)
datagridview to xml and vice versa
i want create Each & Every university result,Notification, time tables, links from xml in vb dynamically displayng