Grid with "Write my own method" tap action - screen param is undefined

Posted by: novascape on 9 September 2017, 8:30 am EST

  • Posted 9 September 2017, 8:30 am EST

    When implementing a tap action using the above, the screen parameter that comes into the tap action method is undefined:

    Steps to recreate:

    1. Create a grid
    2. Click the tap action link in the Properties panel
    3. Select "Write my own method" and give it a name (or use the default name)
    4. Put this code in the tap event: console.log ('tap event screen: ", screen);

    When you run the app and tap the grid line you will notice that the screen is logged as being undefined.

    Must be a bug?
  • Replied 9 September 2017, 8:30 am EST

    Just to clarify, this is with VS2013 RC and the very latest Studio for LightSwitch released recently. Paging has also been enabled with a Previous and Next set of buttons.
  • Replied 9 September 2017, 8:30 am EST

    Hello,

    yes, it seems a problem with VS2013 and I have escalated this issue to the development team for review. I would update you as soon as I hear anything from them.

    Regards
  • Replied 9 September 2017, 8:30 am EST

    Thanks Ashish. This is not a show stopper, but would be nice to be fixed. I've used the following work-around:

    contentItem.value.oncollectionchange = function () {
    if (grid=== null) {
    grid= c1ls.getGridContent(table, contentItem, options);
    grid.screen = contentItem.screen; // work-around to store the screen on the grid object
    ...
    }

    In the tap event one can then access the screen from the grid.screen property.

    Not ideal, but working.
  • Replied 9 September 2017, 8:30 am EST

    Hello,

    I would like to inform you that this issue has fixed in the latest version i.e.
    http://prerelease.componentone.com/dotnet30/C1LightSwitch/2013-T3/

    You may also refer to the following blog for more information on the new features and fixes in this version:
    http://our.componentone.com/2013/11/13/studio-for-lightswitch-2013-v3-release-notes/

    Regards
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels