SmartGWT Power 2.4 / Firefox
Hi. I'm using SQL templating to pull SQL Server into a listgrid. All's well gathering data except for sorting (initial and additional fetches/filters). What is the correct way to configure sorting? I've tried:
1. (in ds.xml) order clause (<orderClause>>COLUMN_NAME) DESC</orderClause>)
2. (in listgrid) setSortField(COLUMN_NAME)
3. (in listgrid) setInitialSort(SortSpecifier)
3. (in listgrid) setSort(SortSpecifier)
5. I've also tried defining the ListGridField with type INTEGER to ensure it was not interpreted as a string (there was another thread on that). It's a currency value, but I removed the cell formatter to see if formatting was causing the problem, its' not. Even as an integer, it does not sort.
When using the <orderClause> the generated SQL 'ORDER BY' clause is correct:
ORDER BY revenue DESC
...and then when executing that generated SQL in SQL Server, the results are sorted corrected, so the SQL is correct and generates correct results. It's not sorted correctly in the ListGrid.
What am I doing wrong?
Thanks in advance.
Hi. I'm using SQL templating to pull SQL Server into a listgrid. All's well gathering data except for sorting (initial and additional fetches/filters). What is the correct way to configure sorting? I've tried:
1. (in ds.xml) order clause (<orderClause>>COLUMN_NAME) DESC</orderClause>)
2. (in listgrid) setSortField(COLUMN_NAME)
3. (in listgrid) setInitialSort(SortSpecifier)
3. (in listgrid) setSort(SortSpecifier)
5. I've also tried defining the ListGridField with type INTEGER to ensure it was not interpreted as a string (there was another thread on that). It's a currency value, but I removed the cell formatter to see if formatting was causing the problem, its' not. Even as an integer, it does not sort.
When using the <orderClause> the generated SQL 'ORDER BY' clause is correct:
ORDER BY revenue DESC
...and then when executing that generated SQL in SQL Server, the results are sorted corrected, so the SQL is correct and generates correct results. It's not sorted correctly in the ListGrid.
What am I doing wrong?
Thanks in advance.
Comment