Facility Control

 View Only
  • 1.  Dynamics rows and column control in dashboard

    Posted 11-30-2023 11:15

    Hello experts, 

    i have 3x3 grid control which has dropdown in each cell in dashboard. is there any possibilites to control those cell visibility by parameter. suppose if i want to display only 2x2  or 2x3 cell dropdown parameter i have to hide 3rd row or column cell, i dont want any fix grid cell count i want dynamics cell in each row and column according to my necessity. 

    thank you



    ------------------------------
    sunil Blank
    Freelancer Graphics Designer
    Freelancer
    Kathmandu Nepal
    ------------------------------


  • 2.  RE: Dynamics rows and column control in dashboard

    Posted 12-05-2023 00:06

    anyone here who is really expert helping me this problem . 



    ------------------------------
    Sunil Blank
    Freelancer Graphics Designer
    Freelancer
    Kathmandu Nepal
    ------------------------------



  • 3.  RE: Dynamics rows and column control in dashboard

    Posted 12-05-2023 13:31

    Hi Sunil,

    I apologize for the delay, I was trying to find a solution to your question. Unfortunately, there doesn't seem to be a way to implement the change of grid column size or row size in the way you are hoping for. I believe other team members are aware of your question and are working on a workaround to this question. 

    Best Regards,



    ------------------------------
    Altaz Daruwala
    Ross Video
    ------------------------------



  • 4.  RE: Dynamics rows and column control in dashboard

    Posted 12-05-2023 14:22

    Hi Sunil

    DashBoard only allows visibility changes for controls that are directly inside of an <abs/> tag.  If you want to make a dynamically-sized grid, you will need to use ogScript to generate the grid content and rebuild it when the dimensions change.

    The most efficient way to do this is by using an <api/> tag with something we call a "content function".  When you use this, the <api/> tag is replaced with the OGLML generated by calling the content function.  In the example I have below, I also put the <api/> tag inside of another <simplegrid/> so that I had a easy way to trigger a rebuild and process the <api/> tag with the new row/column count:

    <abs contexttype="opengear" id="_top" keepalive="false" style="">
       <meta>
          <params>
             <param access="1" constraint="1.0;100.0;1.0;100.0;1" constrainttype="INT_STEP_RANGE" name="Columns" oid="cols" precision="0" type="INT16" value="3" widget="spinner"/>
             <param access="1" constraint="1.0;100.0;1.0;100.0;1" constrainttype="INT_STEP_RANGE" name="Rows" oid="rows" precision="0" type="INT16" value="3" widget="spinner"/>
          </params>
       </meta>
       <label height="26" left="42" name="Columns:" style="txt-align:east" top="49" width="73"/>
       <label height="26" left="42" name="Rows:" style="txt-align:east;" top="91" width="73"/>
       <param expand="true" height="35" left="124" oid="cols" showlabel="false" top="43" width="102"/>
       <param expand="true" height="35" left="123" oid="rows" showlabel="false" top="85" width="102"/>
       <simplegrid height="374" id="dynamic-grid-holder" left="36" rows="1" top="141" width="913">
          <api contentfunction="generate">function generate()
    {
       var content = "&lt;simplegrid  rows=\"" + params.getValue('rows', 0) + "\" cols=\"" + params.getValue('cols', 0) + "\"&gt;";
    
       for (var row = 0; row &lt; params.getValue('rows', 0); row++)
       {
          for (var col = 0; col &lt; params.getValue('cols', 0); col++)
          {
             content += "&lt;button name=\" ROW: " + (row + 1) + " COL: " + (col + 1) + "\"/&gt;";
          }
       }
       
       content += "&lt;/simplegrid&gt;";
    
       return content;
    }</api>
       </simplegrid>
       <button buttontype="push" height="71" left="238" name="Update" top="45" width="175">
          <task tasktype="ogscript">ogscript.reload('dynamic-grid-holder');</task>
       </button>
    </abs>
    



    ------------------------------
    James Peltzer
    Ross Video
    ------------------------------



  • 5.  RE: Dynamics rows and column control in dashboard

    Posted 12-05-2023 15:58

    thank you i will give a try



    ------------------------------
    Sunil Blank
    Freelancer Graphics Designer
    Freelancer
    Kathmandu Nepal
    ------------------------------