Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Status of grid column sort

  1. #1
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,185

    Status of grid column sort

    There are a couple of threads (http://www.lianja.com/community/show...rt+grid+column and http://www.lianja.com/community/show...-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

  2. #2
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    264
    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

  3. #3
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    Hi Georg

    is the grid in a grid section?
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  4. #4
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    264
    Quote Originally Posted by barrymavin View Post
    is the grid in a grid section?
    Yes, most of my grid are in grid sections.

  5. #5
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    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).
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  6. #6
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    264
    Quote Originally Posted by barrymavin View Post
    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)

  7. #7
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    I don't think it is exposed in a grid gadget. I will check the grid attributes and reply later.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  8. #8
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    264
    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

  9. #9
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    264
    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.

  10. #10
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,842
    Hi Georg,

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

    Code:
    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

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us