Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have list form(s) (disp.aspx, edit.aspx, new.aspx) in SharePoint that contain lookup dropdown fields. I'd like to sort the data within the dropdown by descending. Viewing the form code within SharePoint Designer, is there any way to include code in the XPath expression to sort the data?

<SharePoint:FormField runat="server" id="ff4{$Pos}" ControlMode="Edit" FieldName="dateTEST"
    __designer:bind="{ddwrt:DataBind('u',concat('ff4',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@dateTEST')}"/>
share|improve this question

3 Answers 3

Alternativly you can use the "Dataview DropDownList" which is under the Data View Controls on the toolbox.
Once you drag that you will then need to insert a DataSource Control for the list you want to fill the drop down from.
After that that you need to set your new Data Source to you new DropDownList.
On you New Data Source you can then easily configure it to sort and/or filter as you wish.

share|improve this answer

My gut feel says that if you change the sort on the Default View of the lookup list it would give you the same result.

If this doesn't work or it's not an acceptable solution, you could perform a javascript sort

share|improve this answer

Hi my list items are in correct order and i have a column specifying the display order as 1,2,3 but in edit page list values are displayed in 3,2,1 order.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.