Results 1 to 4 of 4

Thread: MultiRow selection in grids

  1. #1
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,162
    Blog Entries
    22

    MultiRow selection in grids

    In the v1.3 release I have implemented "MultiSelect rows" for grids.

    There are two new attributes for grid and attachment sections.

    "MultiSelect rows"

    and

    "MultiSelect row expression"

    Together with a new delegate called "SelectionChanged".

    If you check "MultiSelect rows" in the grid section attributes then the first column of the grid contains a checkbox for each row. Clicking the checkbox calls the "SelectionChanged" delegate passing it a comma separated list of items that are evaluated for each row selected based on the "MultiSelect row expression".

    This provides the ability to select multiple rows in a grid then perform an operation on them (section menu of other action) such as send an email or delete the records, then refresh the grid.

    There is an example App called "example_gridmultiselectrows" that demonstrates how to use this functionality included in the distro.
    Last edited by barrymavin; 2014-12-09 at 05:59.
    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

  2. #2
    Senior Member
    Join Date
    Jan 2014
    Posts
    351
    HI Barry

    Thanks for this latest fantastic enhancement! This would certainly makes my app development a lot easier.

    BTW, if I have a varchar field that store a list of values eg. a list of departments, may I know how can I use this to implement a multi value picklist to let user select multiple departments?

    Your advice is much appreciated

    Thanks & best Regards

  3. #3
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,184
    Hi Tek Hong,

    it's all in the data. User -> user2dept <- department. What's in the grid is the link table, user2dept. Same as VFP or any other language.

    Hank

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,162
    Blog Entries
    22
    Hi Tek Hong,

    As Hank points out you need to take this freeform text out of the varchar field and put it in a table so that it is correctly structured. You can then use the MultuSelect Row functionality by setting the multiselectrows and multiselectrowsexpression properties on the grid object.

    So you would write some custom code that creates this grid and just use Lianja.showDialog() in the DialogButton delegate for a TextBox just as you see in the lianjademo example App that is included in the distribution.
    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

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