Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: nav bar doesn't work

Hybrid View

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

    Name:  Screen Shot 2020-11-14 at 4.54.34 PM.jpg
Views: 226
Size:  99.8 KB
    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
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,181
    Blog Entries
    22
    I cannot reproduce any of this behavior.

    I created an App with a form section at the top and a grid underneath.

    The form section is MSSQL and the grid section is MySQL.

    I clicked the + icon in the relationship builder and connected the form section to the grid section. I then unchecked "Automatically relate" in the section attributes for the top form section.

    Name:  Screen Shot 2020-11-14 at 10.33.37 AM.png
Views: 141
Size:  47.8 KB

    I then selected the lower grid section and added a "parentdatachanged" delegate.

    Code:
    ////////////////////////////////////////////////////////////////
    // Event delegate for 'parentdatachanged' event
    proc page1_section2_parentdatachanged()
        ? "parentdatachanged()"
        ca = cursoradaptor("vt_actors")
        ca.requery("last_name='MAVIN'")
    endproc
    "vt_actors" is the alias for the MySQL grid section.

    Everything works as expected.

    You can test your code interactively if you have any questions about whether it works or not. See below.

    Name:  Screen Shot 2020-11-14 at 9.41.09 AM.jpg
Views: 188
Size:  90.5 KB

    You can reset the requery() like this.

    Name:  Screen Shot 2020-11-14 at 9.41.59 AM.jpg
Views: 167
Size:  112.0 KB

    When requerying the data remember to get the active "search filter" and the "filter" if you are using that, and postfix this to your query so that the search panel is honored too. You can access these in the section like this:

    Code:
    Lianja.get("page1.section2").searchfilter
    Lianja.get("page1.section2").filter
    When using manual relationships like this in order to speed up the loading of an App you should specify "nodata=1" in the VT properties. This prevents any data being retrieved until a "where" condition is specified e.g. in the requery( [expression] ) call. When using VTs this is important for performance otherwise all the data will be retrieved on startup of the App in desktop apps only. Web/Mobile apps are specifically optimized so don't experience this behavior.

    Here is an example of the performance metrics in my test desktop App relating MSSQL with 20k records to MySQL.

    Name:  Screen Shot 2020-11-14 at 11.38.38 AM.jpg
Views: 170
Size:  121.4 KB

    Note that there is an example_virtualtables app in the distro that you can study. It relates two virtual tables together using SQL statements with no parent->child relationship expressions.

    There are always various ways that things can be done in Lianja.
    Last edited by barrymavin; 2020-11-13 at 22:54.
    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
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,181
    Blog Entries
    22
    You can’t have two sections bound to the same table in desktop apps.

    Think about it. Your grid rows, when clicked read the “active record”. The data view gets all out of sync.

    Please post any further issues in a separate thread. This one has become unwieldy. I will close it to prevent any further replies.
    Last edited by barrymavin; 2020-11-14 at 08:37.
    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
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,181
    Blog Entries
    22
    Thread closed due to unwieldy replies and containing multiple issues.
    Last edited by barrymavin; 2020-11-14 at 08:40.
    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