Results 1 to 9 of 9

Thread: multiselectrows grid

  1. #1
    Senior Member
    Join Date
    Oct 2012
    Posts
    207

    multiselectrows grid

    in the system to be rewritten from VFP, I have a function that works on a grid basis and its purpose is very similar to section2 of example_multiselectrows App. I tried to rewrite this function into Lianja with form + grid objects, but I got stuck at the grid checkbox column. What are the solutions for displaying checkboxes in one of the columns on the grid? What events and methods are available to handle a change in checkbox status?

    Is it possible to use a grid section in a form on the model of section 2 of the example application mentioned?

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,235
    See doc

    https://www.lianja.com/doc/index.php...ion_Attributes

    Attribute: ”Multiselect rows”
    Delegate “Selection Changed”
    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

  3. #3
    Senior Member
    Join Date
    Oct 2012
    Posts
    207
    Can a section, like a Lianja framework class, be programmatically added to any container object, just like other objects?
    If I want to use a grid type, what parameters should I use for the addobject() (or Add Object) statement? Or can the type even be set using section.setattribute() method?

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,235
    The delegate is a grid section delegate not a custom grid delegate.

    You can’t add sections to custom containers. You can add custom containers to custom sections however as you already know I’m sure.

    Sections can only be contained within pages. This is the logical structure of a Lianja application which is called the Lianja Object Model (LOM).

    The custom "grid" class has attributes "Multiselectrows" and "Multiselectrowsexpression" that you can set programatically.

    The "
    selectionchanged" event is called when the selection changes. It is called with one argument, a comma separated list of "Multiselectrowsexpression" expressions or the record numbers if none is specified.
    Last edited by barrymavin; 2020-12-07 at 20:36.
    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

  5. #5
    Senior Member
    Join Date
    Feb 2012
    Posts
    1,239
    Hi Strato,

    I am one of those people that loves building all my code by hand. So I define my grids using custom sections. I created a grid with a checkbox that allows multi-select by using a hot-key. If that is what you are looking for, let me know and I will share that code.

    Herb

  6. #6
    Senior Member
    Join Date
    Oct 2012
    Posts
    207
    Hi Herb,
    this is a very kind offer from you, it would be great if I could use it

  7. #7
    Senior Member
    Join Date
    Feb 2012
    Posts
    1,239
    Will do. I just need to put together something that doesn't have my business logic embedded

  8. #8
    Senior Member
    Join Date
    Feb 2012
    Posts
    1,239
    Hi Strato,

    I made a quick video in case anyone else might find it useful.
    Like I said before, I personally like doing everything in the custom sections, so this is geared for that audience.

    Let me know if you get stuck somewhere along the line.

    Herb

    https://youtu.be/dTDi2yZe1mw

  9. #9
    Senior Member
    Join Date
    Oct 2012
    Posts
    207

    thank you Herb!

    cool solution, but i think i need to figure out a little different because because of the large remote tables, "select *" would take too long.

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