I know that drag and drop sorting has been proposed for uComponents v4 (and I'm really looking forward to it), but how about just regular sorting, it doesn't appear to be working for me.
I would expect that the order specified using Content Sort Priority and Content Sort Order in the datatype would be used to not only sort the data for the user in the editor, but also sort the data in the xml that's outputted. Am I wrong in assuming this? Why have sorting options at all, if the xml isn't sorted....?
Anyhow, if my assumption is wrong, any ideas as to how I can sort DynamicXml using Razor?
Replied on your other thread about this. Any input, suggestions you have can be added to the workitem up on CodePlex, I'm sure Ove (DTG developer) would love the feedback!
There isn't, unfortunately. The only workaround I was able to come up with was to iterate through the DynamicXml and store it all in a list of generic objects, then sort from there. The following example sorts training classes stored in the DataType Grid by date, then writes them out grouped by month:
foreach (dynamic c in Model.classes) { DateTime date = DateTime.Now; // If the date is blank, use today's date.
try { date = Convert.ToDateTime(c.date.InnerText); } catch {}
string month = date.ToString("MMMM");
var training = new { Date = date, Month = month, Title = c.title.InnerText, Link = c.link.InnerText, Instructor = new { Name = c.instructor.InnerText, Link = c.instructorLink.InnerText }, Location = c.location.InnerText };
I'm currently experiencing sorting issues with DataType Grid. The arrows seem to do nothing, and the list (11 items) displayed in my content node are in the following) order: 10, 11, 1, 2, 3, 4, ...... 9.
uComponenets version: 5.4.0
umbraco version: 4.11.4
Also had UI issues (js error in the back office - image resizer) when I had DAMP picker installed. After I uninstalled DAMP the UI issue was gone.
DataType Grid Sorting
I know that drag and drop sorting has been proposed for uComponents v4 (and I'm really looking forward to it), but how about just regular sorting, it doesn't appear to be working for me.
I would expect that the order specified using Content Sort Priority and Content Sort Order in the datatype would be used to not only sort the data for the user in the editor, but also sort the data in the xml that's outputted. Am I wrong in assuming this? Why have sorting options at all, if the xml isn't sorted....?
Anyhow, if my assumption is wrong, any ideas as to how I can sort DynamicXml using Razor?
Hi Douglas,
Replied on your other thread about this. Any input, suggestions you have can be added to the workitem up on CodePlex, I'm sure Ove (DTG developer) would love the feedback!
Thanks, Lee.
Hi, is there a way to sort DynamicXml using Razor?
Thanks :-)
There isn't, unfortunately. The only workaround I was able to come up with was to iterate through the DynamicXml and store it all in a list of generic objects, then sort from there. The following example sorts training classes stored in the DataType Grid by date, then writes them out grouped by month:
Hope you find this helpful!
Thank you very much!
I'm currently experiencing sorting issues with DataType Grid. The arrows seem to do nothing, and the list (11 items) displayed in my content node are in the following) order: 10, 11, 1, 2, 3, 4, ...... 9.
uComponenets version: 5.4.0
umbraco version: 4.11.4
Also had UI issues (js error in the back office - image resizer) when I had DAMP picker installed. After I uninstalled DAMP the UI issue was gone.
is working on a reply...