SQLDataGrid Mockup

Can you use a SQLDataGrid to mockup a table. I do not see a way to have a table in a graphic without the SQLDataGrid object. I know there is a widget, but since I am using OMI it doesn't work within a graphic. I eventually want to have it pull data from a sql table but for demonstration purposes would like to create a mockup table without a database. 

  • Hi Caroline, there are a number of solutions, and some of them are version dependent.

    Starting with System Platform 2023, we actually allow Widgets to be placed on the graphic and OMI will render it correctly! So if the data grid widget ticks all the boxes you have, just make sure you have 2023 or later and you can place it directly on the graphic.

    The alternative is to use panes in a layout and wire it up via the properties. Depending on the version, this can be done via a ViewApp Namespace, or, more recently using MyContent. to reference content on other panes directly.

    You then have some choices to make about the content itself. You can use the Data Web widget that is already there.

    Or you could find the SQL data grid controll dll.  The grid control is a WinForms .NET control, so you need to wrap it as an OMI App - like this:

    1. In File Explorer, expand This PC and navigate to:
      C:\Program Files (x86) \ArchestrA\Framework\FileRepository\TrainingGalaxy\Vendors\Invensys_Systems__Inc__SQLDataGridUserCtrl.dll
    2. Select all files in the folder, right-click, and then select Copy.
    3. In File Explorer, navigate to a convenient folder or create a folder and paste the copied files into it.
    4. In the System Platform IDE, on the Galaxy menu, select Import | Visualization | OMI App.
    5. Navigate to the folder used in #3 and Click "Select Folder"
    6. The SQLDataGridApp will now be availbale in the Visualization toolbox.

    If you have another .NET Winforms or .NET WPF control you'd rather use, you can follow similar steps (the dll's must be either .NET Framework 4.8.1 or .NET STandard 2.0). OMI Apps cannot at this stage be placed on Industrial graphics, they have to be placed in a pane on a layout and wired up via a ViewApp NAmespace or using the MyContent. path.

    Hope this helps

     - Ernst

  • Agreed with Ernst, I've tested out with version 2023R2 and found some satisfactory results in rapidly mocking up a data on our DataGrid widget within an industrial graphic. You can easily paste a JSON payload in the data source field but make sure you remove all whitespace data or else it will fail to load, has a neat little repair function as well. A tool that I found useful is the following online link:

    https://jsonformatter.org/

    Note: Provided a sample of what could be used

    [{"id":1,"name":"cerulean","year":2000,"color":"#98B2D1","pantone_value":"15-4020"},{"id":2,"name":"fuchsia rose","year":2001,"color":"#C74375","pantone_value":"17-2031"},{"id":3,"name":"true red","year":2002,"color":"#BF1932","pantone_value":"19-1664"},{"id":4,"name":"aqua sky","year":2003,"color":"#7BC4C4","pantone_value":"14-4811"},{"id":5,"year":2004,"color":"#E2583E","pantone_value":"17-1456"},{"id":6,"name":"blue turquoise","year":2005,"color":"#53B0AE","pantone_value":"15-5217"}]