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
dg-Reset Sort By Column / Sort By dg Index
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Contact:
dg-Reset Sort By Column / Sort By dg Index
Thanks Trevor,
Ha ha (I feel a little foolish now), seemed all too obvious when I saw the answer.
Works perfectly well.
In my opinion the DataGrid is a major triumph that may single-handedly bring many new customers to Revolution.
Trevor, still dreaming of a day when I can freeze a column as per our discussion back in mid April http://forums.runrev.com/phpBB2/viewtop ... highlight=. But constraint brings innovation and I have crafted a quasi headup display I place at the top of my grids to display data for the dgHilitedIndex (currently hilited record). When working extensively with data editing, analysing data it has saved me a great deal of scrolling particularly when you have more than 10-12 columns. Nothing special though it is really just a collection of fields that show a large or miniature view of data in columns that are important or not in view for the hilited record. I must say the learning curve for Rev and the Grid is a very well supported affair.
Kind regards - Andrew
Ha ha (I feel a little foolish now), seemed all too obvious when I saw the answer.
Works perfectly well.
In my opinion the DataGrid is a major triumph that may single-handedly bring many new customers to Revolution.
Trevor, still dreaming of a day when I can freeze a column as per our discussion back in mid April http://forums.runrev.com/phpBB2/viewtop ... highlight=. But constraint brings innovation and I have crafted a quasi headup display I place at the top of my grids to display data for the dgHilitedIndex (currently hilited record). When working extensively with data editing, analysing data it has saved me a great deal of scrolling particularly when you have more than 10-12 columns. Nothing special though it is really just a collection of fields that show a large or miniature view of data in columns that are important or not in view for the hilited record. I must say the learning curve for Rev and the Grid is a very well supported affair.
Kind regards - Andrew