MySubscriptions - sorting
Posted: Wed Jun 10, 2015 3:27 am
I'd like the grid to default to ordering by ExpirationDate Descending. I tried changing it on the SubscriptionDs but it doesn't seem to have any affect. What am I doing wrong?
Original:
Here's the part I modified:
Original:
Code: Select all
<asp:ObjectDataSource ID="SubscriptionsDs" runat="server" SelectMethod="LoadForUser" UpdateMethod="Update" OldValuesParameterFormatString="original_{0}"
TypeName="CommerceBuilder.Orders.SubscriptionDataSource"
DataObjectTypeName="CommerceBuilder.Orders.Subscription"
onselecting="SubscriptionDs_Selecting" SortParameterName="sortExpression" EnablePaging="true" >
<SelectParameters>
<asp:Parameter Name="userId" DefaultValue="0" Type="Int32" />
<asp:Parameter Name="sortExpression" DefaultValue="Id DESC" />
</SelectParameters>
</asp:ObjectDataSource>
Code: Select all
<asp:Parameter Name="sortExpression" Type="String" DefaultValue="ExpirationDate DESC" />