I have a datasource with 50 rows per page. The table has some 500 rows. I also have a grid on this datasource, and an action to sort the values when a header column is clicked.

By using api_datasource.setfilterorderby it works but ONLY in the shown page meaning that it sorts the 50 shown rows only. It doesn't sort the entire 500 rows.

I also tried to base the order by clause of the datasource on a parameter (order by is declared as :orderBy where :orderBy is the parameter), set this parameter to "my_column ASC" or "my_column DESC" and finally run the api_datasource.executequery to refresh the results. In this case it looks like the system ignores completelly the order by clause, even if the parameter has some value. I guess that it takes the order by clause as it was at design time and the parameter is not evaluated.

How can I sort the entire result set by re-executing the query with a new order by each time?

Thank you.


asked 05 Oct '12, 12:59

Vlisidis%20Akis's gravatar image

Vlisidis Akis
accept rate: 5%

Hi Akis,

You can sort the entire result set by re-executing the query by setting the sortMode attribute of the grid column to be sorted as "ExecuteQuery";

<grid ...>
  <column ... sortMode="ExecuteQuery">

Kind Regards, Ibrahim


answered 05 Oct '12, 13:17

Ibrahim%20Sandalli's gravatar image

Ibrahim Sand... ♦♦
accept rate: 25%

The solution was in front of me!!!! I was using "InDatasource". Thank you Ibrahim for one more time.


(06 Oct '12, 03:01) Vlisidis Akis
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 05 Oct '12, 12:59

Seen: 2,357 times

Last updated: 06 Oct '12, 03:01

© Copyright Gerger 2017