Page 1 of 1
Sortable Columns on Grid with Custom SQL not working
Posted: Fri Mar 02, 2012 11:41 am
by bluttman
Moveable, sizeable seem to be fine.
Sortable does work with program built subfile.
Any idea?
Thanks!
Re: Sortable Columns on Grid with Custom SQL not working
Posted: Fri Mar 02, 2012 11:47 am
by Brian
So you are using the custom SQL property to populate your grid? And you have the sortable columns property set to true? And the headings are listed in the column headings property?
What version of Profound UI are you using?
Re: Sortable Columns on Grid with Custom SQL not working
Posted: Fri Mar 02, 2012 12:08 pm
by Brian
Ok, after rereading and thinking about your question, the answer is you are correct. Sorting will not work in this scenario.
When you use the DB properties to pull data into your grid, the Profound UI framework builds the SQL statement on the fly to retrieve the data. When you sort, it sticks an order by clause in the statement and pulls the data again.
when you use a custom SQL statement, the framework cannot insert the order by into the statement. Since the statement can't be reasonably altered and it has no idea how many records it would need to pull to sort after the fact, it simply doesn't allow it.
If you need a complex SQL statement to retrieve your grid data and want to sort there is another option. You can create an SQL view using your complex select statement. Then the normal DB properties can be pointed to your view instead of the table. Then sorting should work for you.
Re: Sortable Columns on Grid with Custom SQL not working
Posted: Fri Mar 02, 2012 3:35 pm
by bluttman
Thanks!