I suggest you ...

Enable Dynamic Queries

It would be really nice if dynamic queries could be used in PreProcessQuery method. For example, if Dynamic Linq Library functionality was built into LS we could use strings instead of lambda expressions in Linq OrderBy & Where clauses.

Like this:
query = query.OrderBy("LastName, FirstName DESC")
Instead of this:
query = query.OrderBy(a <= a.LastName).ThenDescendingBy(a <= a.FirstName)

Related discussion here:
http://social.msdn.microsoft.com/Forums/vstudio/en-US/500229db-f462-4fb4-ac25-9ab501a32607/html-table-server-side-sort

There is an old unreleased Dynamic Linq Library that does this seen here:

http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx

This would allow us to easily enable server-side sort based on runtime-user interaction. For example: Allow users to sort the HTML Table Control by clicking on column headers.

There are related comments in this blog:

http://blogs.msdn.com/b/lightswitch/archive/2013/09/11/the-lightswitch-html-table-control-rohit-agrawal.aspx?wa=wsignin1.0&CommentPosted=true#comments

Bringing this a step further, it would be nice if the LS Query Designer would allow defining a sort on an optional string parameter. That way we'd not need to use PreProcessQuery since the Dynamic Linq Library can apply the sort from a tSQL-like string of comma delimited field names.

37 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    joshbookerjoshbooker shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Dan R GleasonDan R Gleason commented  ·   ·  Flag as inappropriate

        I agree fully with the above suggestion. The HTML table should have the same sortable column header function as broswer based grid and it would make it so much easier to have non-lambda expressions for sorting and filtering. It makes it a lot faster when you keep the expressions as close to "plain english" format as possible so we can keep focus on the LOB requirements and not the "Bing" search hits...

      Feedback and Knowledge Base