Completly stuck.... With XML Sorting
-
Hi, I've been looking all over the Internet and my books for an answer to this, but I cannot find it anywhere, I used to be working with SQL and I am new to XML coding. I’m building a corporate website that is receiving it’s data through an xml adapter. The data is unsorted. I need to sort it in two ways 1. Sorted by date in the gridview Before it’s sent to the client the xml should be sorted by date, with no further sorting functions in the gridview. 2. Sortable by the user in the gridview This should be sortable by the user clicking the column in the gridview. Setting
allowsorting=”true”
expects some coding in the sorting sub. I tried so much that didn’t workProtected Sub GrvSearchOffers_Sorting(ByVal sender As Object, ByVal e As GridViewSortEventArgs)
End Sub
In both cases I retrieve the xmldata in the code behind file using a dataset. This dataset is bound to the gridview displaying the unsorted data. Thanks in advance for any help, I'm getting a bit desperate. Bram
-
Hi, I've been looking all over the Internet and my books for an answer to this, but I cannot find it anywhere, I used to be working with SQL and I am new to XML coding. I’m building a corporate website that is receiving it’s data through an xml adapter. The data is unsorted. I need to sort it in two ways 1. Sorted by date in the gridview Before it’s sent to the client the xml should be sorted by date, with no further sorting functions in the gridview. 2. Sortable by the user in the gridview This should be sortable by the user clicking the column in the gridview. Setting
allowsorting=”true”
expects some coding in the sorting sub. I tried so much that didn’t workProtected Sub GrvSearchOffers_Sorting(ByVal sender As Object, ByVal e As GridViewSortEventArgs)
End Sub
In both cases I retrieve the xmldata in the code behind file using a dataset. This dataset is bound to the gridview displaying the unsorted data. Thanks in advance for any help, I'm getting a bit desperate. Bram
I think an XSLT stylesheet is your best option for sorting the actual XML. Beyond that, you could read your XML data into the entity classes that I assume exist, sort those, and then view from there.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.