PDA

View Full Version : Status of grid column sort



HankFay
2014-05-29, 14:22
There are a couple of threads (http://www.lianja.com/community/showthread.php?626-Expose-Click-event-for-Header-in-Grid/page2&highlight=sort+grid+column and http://www.lianja.com/community/showthread.php?1534-New-Grid-Sort-delegate ) on the ability to sort a grid column by clicking on the header.

I thought I'd check in on the status of such (since it's not reflected in the Wiki) for 1) grid sections; 2) grids in a form section, 3) grids on a canvas section, and 4) grids on a custom section.

thanks,

Hank

gcjm
2014-07-30, 03:06
It isn't clear for me HOW to sort a grid column. E.g. there is noting to check in the column property.
(The grid is in an own related Form Section and the column to sort has noting to do with parent/child key).
I'm using vers. 1.1.6
Thank you
Georg

barrymavin
2014-07-30, 04:07
Hi Georg

is the grid in a grid section?

gcjm
2014-07-30, 05:37
is the grid in a grid section?
Yes, most of my grid are in grid sections.

barrymavin
2014-07-30, 06:10
I'm not on my computer at the moment but if I recall correctly "Sortable" is a grid attribute.

in development mode you click on the grid column header once to create an index in ascending order and again to create an index in descending order.

the created index is prefixed with the child key expression so the relationship still works. Clicking on the column header at runtime will select the sort order based on that column. There should be an indicator to show what order is active (down arrow or up arrow).

gcjm
2014-07-30, 07:48
I recall correctly "Sortable" is a grid attribute.

Sorry, I can't find a "Sortable" attribute wether in "Grid section attributes" nor in "Grid column attributes".
Also not in a "Grid gadget" dragged on a "Form section".
(I'm using version 1.1.6)

barrymavin
2014-07-30, 08:04
I don't think it is exposed in a grid gadget. I will check the grid attributes and reply later.

gcjm
2014-08-13, 13:35
Is there news in sorting grid columns? How could I sort a grid column (of a grid section) in a web app? I use Version 1.2. now

gcjm
2014-08-13, 15:37
There is a "Sort" in the grid section Custom Delegates.
The tooltip text says:
"The delegate for the column Sort fired when the header is clicked.
This is called with 2 args (..._sort(nColumn,nDirection)".
Is anywhere a description of this call?
f.e the values for nDirection.
I tried out 1 and 2 (page1_(grid)section1_sort(4,1 and 2). It doesn't work.

yvonne.milne
2014-08-14, 07:52
Hi Georg,

You can call the grid.sort() method (http://www.lianja.com/doc/index.php/Grid), e.g.:


oGrid = Lianja.get("page1.section1").grid
// sort 3rd column ascending
// columns start from 0
// direction: 1=ascending, -1 = descending
oGrid.sort(2,1)

The Sort delegate is not currently called when clicking on the column headers.
I'll check on support in JavaScript and the Web Client.

Regards,

Yvonne

hmischel@diligentsystems.com
2014-08-25, 16:36
Hi,

I think adding sortable to the column attribute would be very intuitive and very useful.

I am thinking that this may already be on the enhancement list since its pretty common.
If it's not, please let me know and I will add it.

Thanks.

Herb