Hi I am using a gridview and have have to set a sort expression, I am using:
<asp:TemplateField HeaderText="Order Name" SortExpression="OrderId">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# OrderName(((DataLayer.Car)Container.DataItem).OrderId) %>' />
</ItemTemplate>
<ItemStyle Width="120px" />
</asp:TemplateField>
But I rather want to sort by the name which I get from the OrderId than the actual OrderId - but I havent been able to find out if this is doable, and how?