Reorder a data view wep part (DVWP)

Posted on 2011-10-26
Last Modified: 2012-05-12

MOSS 2007

I only have access to the page via Edit Page and editing the DVWP in the gui.
I cannot update the view either.

How can I reverse sort this?

<xsl:stylesheet xmlns:x="" xmlns:d="" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="" xmlns:asp="" xmlns:__designer="" xmlns:xsl="" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
	<xsl:import href="/Style Library/XSL Style Sheets/webTest.xsl"></xsl:import>
	<xsl:output method="html" indent="no"/>
	<xsl:decimal-format NaN=""/>
	<xsl:param name="dvt_apos">'</xsl:param>
	<xsl:param name="Today">CurrentDate</xsl:param>
	<xsl:variable name="dvt_1_automode">0</xsl:variable>
	<xsl:template match="/" xmlns:x="" xmlns:d="" xmlns:asp="" xmlns:__designer="" xmlns:SharePoint="Microsoft.SharePoint.WebControls">
		<xsl:call-template name="dvt_1"/>
	<xsl:template name="dvt_1">
		<xsl:variable name="dvt_StyleName">Table</xsl:variable>
		<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>
		<xsl:variable name="dvt_RowCount" select="count($Rows)" />
		<xsl:variable name="IsEmpty" select="$dvt_RowCount = 0" />

		<xsl:call-template name="dvt_1.body">
			<xsl:with-param name="Rows" select="$Rows"/>

	<xsl:template name="dvt_1.body">
		<xsl:param name="Rows"/>
		<xsl:variable name="GroupStyle" select="'UpcomingHeader'"/>
		<xsl:call-template name="UpcomingHeader" />

<xsl:if test="count($Rows)=0">
<p>There are currently no upcoming webinars. For recordings of past webinars, please use the links below.</p>
		<xsl:for-each select="$Rows">
			<xsl:variable name="Style" select="'Upcoming'"/>
					<xsl:call-template name="Upcoming" /></xsl:for-each>

Open in new window

Question by:sullisnyc44
    LVL 50

    Expert Comment


    sorting takes place inside the xsl:for-each tag

    		<xsl:for-each select="$Rows">
    			<xsl:variable name="Style" select="'Upcoming'"/>
                            <xsl:sort select="@Title" order=”descending” />
    			<xsl:call-template name="Upcoming" /></xsl:for-each>

    Open in new window

    Replace the "@Title" with the column you want to sort by.

    cheers, teylyn

    Author Comment

    tells me to edit it in sharepoinnt designer. won't render.

    forgot to mention that it's a publishing page

    Author Comment

    LVL 50

    Accepted Solution

    You cannot change a DVWP in the browser. You need SharePoint Designer to edit the XSLT.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
    When installing SharePoint 2010 RTM I came across a strange error, I was getting timeouts during the installation. I searched the web and found the best solution to be found here (…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now