Access to the grid object in other screen

Access to the grid object in other screen

  • 27 Juni 2019 um 2:37 am #33047
    [email protected]

    Hello guys
    i inserted a grid object in one of screens, then i used a button to popup another screen. My question is how to access the grid when the popup screen is opened? For example, how to refresh the grid?

  • 27 Juni 2019 um 3:14 pm #33050

    What you described it seems to me, let’s say, a „normal“ behavior.
    The popup „takes the control“ and the actions must be taken inside this context.
    You cannot act freely on the synoptic below.

    The workaround could be use „Open frame“ instead of „Open popup“.

    • 28 Juni 2019 um 2:57 am #33053
      [email protected]

      Thanks Robin.
      Maybe you didn’t understand me. Actually, i want to get the property and method of the object in another screen with Basic script, like „GetSynopticObject“.
      In the popup screen, i inserted a button, and added „click“ event of Basic script. In the script, i tried to access to the grid control in another screen, but when i run the application, it always come out an error message.

  • 28 Juni 2019 um 3:35 pm #33054

    Hi ,
    Ok now is more clear 🙂
    I can see this easy approach to optimize the script context (it’s not the top for my experience to keep sparse scripts in different objects as you are looking for to do).

    I would suggest to proceed as follows:

    -The script only under the grid object script context
    -Then, let’s say, you have to refresh the grid from another screen as You told on the form…
    -You can insert an internal tag like „GridRefresh“, it’s a boolean variable, and you can toggle this variable normally from a button for example (standard commands)
    -Under the grid object you can add a „VAR Script Event“
    -From the Movicon editor Resources Exporer > expand the screen resource > get the grid object , then right click > Add new variable script event > and select the GridRefresh variable
    -In the script conext under the grid you will have this event:

    the script will be like:

    Public Sub OnGridRefreshChanged(value As Variant)

    ‚Refresh Grid Object

    End Sub

    every time you changed this tag You will refresh the object

    I think it’s the better approach


    • 1 Juli 2019 um 2:37 am #33056
      [email protected]

      Thanks Robin
      That’s a very clever method. It’s helpful. Thank you again.

  • 26 März 2020 um 6:17 pm #36015
    [email protected]

    potrei avere maggiori dettagli riguardo alla creazione del VAR script event all’interno di NEXT build 270.

    Mi trovo a dover risolvere lo stesso problema esposto nel post ma non riesco a capire come creare il VAR script event e come utilizzarlo nello script del grid control

    grazie mille

  • 27 März 2020 um 4:34 pm #36023

    Hello Sir,
    This post is dedicated to the Movicon 11 product.
    To avoid confusion, please open a new ticket in the dedicated forum section „Movicon.NExT Scada“.
    Thanks for the cooperation.
    Best Regards

Du musst angemeldet sein, um auf dieses Thema antworten zu können.