Hi Isomorphic,
I think there might be use for the API ListGridField.setSortField(String sortField) in ListGridField (http://www.smartclient.com/smartgwte...GridField.html) in SmartGWT.
See this use-case:
So far I can't do this. In my task.ds.xml I'd have:
Now, with the already available API setSortByDisplayField(boolean) I can configure whether to sort by priority_id or priority_name. Sorting via priority_position or any other field is not possible.
Using setSortNormalizer is no option in my opinion as it would lead to inconsistent behaviour with regards to SQL-paging.
So I think a method setSortField(String sortField) might be very useful, as this would be used locally as well as with SQL-paging.
What do you think? Am I missing something?
Thanks,
Blama
I think there might be use for the API ListGridField.setSortField(String sortField) in ListGridField (http://www.smartclient.com/smartgwte...GridField.html) in SmartGWT.
See this use-case:
- Editable (important) ListGrid
- table task (id, name, priority_id)
- table priority (id, name, position) with values
- {34; Low; 1}
- {3; Medium; 2}
- {100; High; 3}
- tasktable is shown in ListGrid, on click on the priority-columnheader it should be sorted by priority-position.
So far I can't do this. In my task.ds.xml I'd have:
Code:
<field name="priority_id" displayField="priority_name" /> <field name="priority_name" nativeName="name" tableName="priority" /> ... [table-clause with join, or add includeFrom/foreignKey above] ...
Using setSortNormalizer is no option in my opinion as it would lead to inconsistent behaviour with regards to SQL-paging.
So I think a method setSortField(String sortField) might be very useful, as this would be used locally as well as with SQL-paging.
What do you think? Am I missing something?
Thanks,
Blama
Comment