Plex 2E

 View Only
  • 1.  How to check if a variable is a grid and get grid control name with metadata

    Posted Nov 18, 2016 01:24 AM

    Hi, 

     

    What I want to do is loop all the variables in a panel (WinC) check if its a Grid if its a grid get the grid Control Name by using meta data, could you please assist me in the syntax needed I am not that great with meta data coding.

     

    This is what I have so far : 

     

    +++Define Field: AbbreviatedName
     +For Each Variable .Panel
     +++Set Value To Current Field: AbbreviatedName
     +For Each Property

    Not sure if I am on the correct track?

     

    Thanks.



  • 2.  Re: How to check if a variable is a grid and get grid control name with metadata

    Posted Nov 18, 2016 03:22 AM

    Is this even possible?



  • 3.  Re: How to check if a variable is a grid and get grid control name with metadata
    Best Answer

    Posted Nov 18, 2016 04:16 AM

    no it is not possible. 

     

    But read https://communities.ca.com/message/241861207?commentID=241861207#comment-241861207  which may also help see meta might not be the way you really need

     

    What is your use case?



  • 4.  Re: How to check if a variable is a grid and get grid control name with metadata

    Posted Nov 18, 2016 04:49 AM

    I am writing a pattern for saving a users grid column sequence, I know this is standard functionality and that it reads the INI to determine this but in my example the company is using thin servers to host the application so each user does not have there own ini file on the server... So I am writing a pattern that we can inherit from and will overwrite the column seq when the screen opens. For this I would like to get the grids on a screen control name using this and keeping track of the fields in the grid I can set the column seq using C++.  I have a work around where each developer would have to specify the control name on each screen but would of liked it if I could do this automatically. Hope this makes sense.



  • 5.  Re: How to check if a variable is a grid and get grid control name with metadata

    Posted Nov 18, 2016 07:14 AM

    StellaTools.Abstract.UIBASIC._GridAdjustColumnWidthsToData  might help you on a few things

     

    And see https://communities.ca.com/message/99150496?commentID=99150496#comment-99150496