Here is generated SQL, captured by DBMonitor:
1) For table where sorting works fine (only standard gridView and entity data source wired to specific table):
SELECT
"Extent1"."name" AS "name",
"Extent1".description AS description,
"Extent1".expires AS expires,
"Extent1".fullname AS fullname,
"Extent1".kanal AS kanal,
"Extent1".validatephotos AS validatephotos,
"Extent1".weekday_begin AS weekday_begin,
"Extent1".optlock AS optlock
FROM portal.products AS "Extent1"
ORDER BY "Extent1".description ASC
orderby column changes as I sort GridView.
2) When used with Dynamic Data:
SELECT
c."name" AS "name",
c.description AS description,
c.expires AS expires,
c.fullname AS fullname,
c.kanal AS kanal,
c.validatephotos AS validatephotos,
c.weekday_begin AS weekday_begin,
c.optlock AS optlock
FROM portal.products AS c LIMIT 10 OFFSET 0
So there is no ORDER BY clause no matter if it is first table viewing or it is querry requested by sorting.
Best regards
Jacek Skowron