dg-Reset Sort By Column / Sort By dg Index
Posted: Mon Oct 05, 2009 12:16 pm
Hello All,
I am living in the world of the DataGrid at present. It's a nice place to be.
Background to the question.
Before any user interaction, a dg will display in the order of it's internal index dgIndex (from observation I believe this to be so).
If a user clicks in a column header in the datagrid it will toggle sort asc/desc which is the default behavior. All good.
Two questions, aiming to achieve the same result.
Q1: What is the syntax to programatically reset (remove - not replace) the current sort for the dg?
set the dgColumnSortType [ COLUMN ] of group "Data Grid" to "numeric" allows you to set it, but perhaps you can use similar code to remove/reset sorting as well.
Q2: How do you programatically ask the grid to sort by it's internal index, when a column is currently selected for sort?
Any assistance greatly appreciated.
Kind regards, Andrew
I am living in the world of the DataGrid at present. It's a nice place to be.
Background to the question.
Before any user interaction, a dg will display in the order of it's internal index dgIndex (from observation I believe this to be so).
If a user clicks in a column header in the datagrid it will toggle sort asc/desc which is the default behavior. All good.
Two questions, aiming to achieve the same result.
Q1: What is the syntax to programatically reset (remove - not replace) the current sort for the dg?
set the dgColumnSortType [ COLUMN ] of group "Data Grid" to "numeric" allows you to set it, but perhaps you can use similar code to remove/reset sorting as well.
Q2: How do you programatically ask the grid to sort by it's internal index, when a column is currently selected for sort?
Any assistance greatly appreciated.
Kind regards, Andrew