This is a migrated thread and some comments may be shown as answers.

[Solved] EntityDataSource OrderBy multiple parameters

1 Answer 256 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nikola
Top achievements
Rank 2
Nikola asked on 20 Aug 2013, 12:25 PM

Is it somehow possible to make a orderby with more then one attribute ? I dont want to to something in the code behind if this is possible I would like to do it in the EntityDataSource

What I have tried :

<asp:EntityDataSource ID="dsDossier" runat="server" ConnectionString="name=zevtestEntities" Include="BU,LBU,ZevUser" DefaultContainerName="zevtestEntities" EnableFlattening="False" EntitySetName="Dossier" OrderBy="it.BU.Code  , it.LBU.Code DESC "></asp:EntityDataSource>

But somehow this is not working why so ever

Thanks for help and fast answer

1 Answer, 1 is accepted

Sort by
0
Accepted
Antonio Stoilkov
Telerik team
answered on 23 Aug 2013, 08:57 AM
Hi Nikola,

In order to achieve your scenario you could use the RadControls build in multi sorting in some of our controls. However, the EntityDataSource could not order by multiple fields. Optionally you could subscribe to the EntityDataSource Selected event and manually sort the remaining data.

Regards,
Antonio Stoilkov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Nikola
Top achievements
Rank 2
Answers by
Antonio Stoilkov
Telerik team
Share this question
or