Is there a lightweight way to display Tree-Grid-Data in Forms?

Hi community,

I am playing around with displaying some data structure as Tree-Grid-View in Forms. The amount of data is very small.

Normally we can display Tree-Grid-View data in relationships or pop-up dialogs. But I don´t want that users have to click around every time they need to see the data. It´s data that´s useful for daily work, so it would be super useful when it´s directly accessible within the Form.

I discovered that it is possible to display Tree-Grid-Views in Forms. But from my POV the regular TGV layout is a little bit too heavy for my use case. I only want to display a small amount of data (only one data column, not much levels). Basically I just need the TGV data, no toolbar, no headers, no actions. Just a simple view to the data.

Does anyone now a more lightweight rendering variants for TGVs?

Thanks for any input!

Angela

Parents
  • Tried several times reply to Angela's last post and each time my answer disappears after page refresh. May be this reply will work?

    AML does not returns level, but we can add it by XSL transform. Assume we have this AML query:

    <Item type='Part' action='GetItemRepeatConfig' id='9A30F9C89FCD4D26B720A439E2CBF48B' select='id,item_number'>
      <Relationships>
        <Item action='get' type='Part BOM' select='related_id(id,item_number),quantity' repeatProp='related_id' repeatTimes='10'></Item>
      </Relationships>
    </Item>

    if we apply this XSL to result

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
      <xsl:output method="xml" indent="yes"/>
    
      <xsl:template match="/">
        <table font="Microsoft Sans Serif-8" sel_bgColor="steelbue" sel_TextColor="white" header_BgColor="buttonface" expandroot="true" expandall="false" treelines="1" editable="false" draw_grid="true" multiselect="true" column_draggable="false" enableHtml="false" enterAsTab="false" bgInvert="true" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:aras="http://www.aras.com" xmlns:usr="urn:the-xml-files:xslt">
          <thead>
            <th align="c">Part Number</th>
            <th align="c">Part Name</th>
            <th align="c">Quantity</th>
          </thead>
          <columns>
            <column width="60" edit="NOEDIT" align="l" order="0" />
            <column width="220" edit="NOEDIT" align="l" order="1" />
            <column width="60" edit="NOEDIT" align="r" order="2" sort="numeric"/>
          </columns>
          <menu>
            <emptytag/>
          </menu>
          <xsl:apply-templates select="./Item[@type='Part']"/>
        </table>
      </xsl:template>
      <xsl:template match="Item[@type='Part']">
        <xsl:variable name="level" select="count(ancestor::*)"/>
        <xsl:element name="tr">
          <xsl:attribute name="level">
            <xsl:value-of select="$level div 4"/>
          </xsl:attribute>
          <xsl:attribute name="icon0">
            <xsl:text>../images/Part.svg</xsl:text>
          </xsl:attribute>
          <xsl:attribute name="icon1">
            <xsl:text>../images/Part.svg</xsl:text>
          </xsl:attribute>
          <xsl:attribute name="class">
            <xsl:text>dragClass</xsl:text>
          </xsl:attribute>
          <userdata key="gridData_rowItemID" value=" " />
          <td>
            <xsl:value-of select="item_number"/>
          </td>
          <td>
            <xsl:value-of select="id/@keyed_name"/>
          </td>
          <td>
            <xsl:value-of select="ancestor::Item[1]/quantity"/>
          </td>
          <xsl:apply-templates select="Relationships/Item/related_id/Item[@type='Part']"/>
        </xsl:element>
      </xsl:template>
    </xsl:stylesheet>
    

    we'll get xml, ready for TreeGridContainer.InitXML:

Reply
  • Tried several times reply to Angela's last post and each time my answer disappears after page refresh. May be this reply will work?

    AML does not returns level, but we can add it by XSL transform. Assume we have this AML query:

    <Item type='Part' action='GetItemRepeatConfig' id='9A30F9C89FCD4D26B720A439E2CBF48B' select='id,item_number'>
      <Relationships>
        <Item action='get' type='Part BOM' select='related_id(id,item_number),quantity' repeatProp='related_id' repeatTimes='10'></Item>
      </Relationships>
    </Item>

    if we apply this XSL to result

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
      <xsl:output method="xml" indent="yes"/>
    
      <xsl:template match="/">
        <table font="Microsoft Sans Serif-8" sel_bgColor="steelbue" sel_TextColor="white" header_BgColor="buttonface" expandroot="true" expandall="false" treelines="1" editable="false" draw_grid="true" multiselect="true" column_draggable="false" enableHtml="false" enterAsTab="false" bgInvert="true" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:aras="http://www.aras.com" xmlns:usr="urn:the-xml-files:xslt">
          <thead>
            <th align="c">Part Number</th>
            <th align="c">Part Name</th>
            <th align="c">Quantity</th>
          </thead>
          <columns>
            <column width="60" edit="NOEDIT" align="l" order="0" />
            <column width="220" edit="NOEDIT" align="l" order="1" />
            <column width="60" edit="NOEDIT" align="r" order="2" sort="numeric"/>
          </columns>
          <menu>
            <emptytag/>
          </menu>
          <xsl:apply-templates select="./Item[@type='Part']"/>
        </table>
      </xsl:template>
      <xsl:template match="Item[@type='Part']">
        <xsl:variable name="level" select="count(ancestor::*)"/>
        <xsl:element name="tr">
          <xsl:attribute name="level">
            <xsl:value-of select="$level div 4"/>
          </xsl:attribute>
          <xsl:attribute name="icon0">
            <xsl:text>../images/Part.svg</xsl:text>
          </xsl:attribute>
          <xsl:attribute name="icon1">
            <xsl:text>../images/Part.svg</xsl:text>
          </xsl:attribute>
          <xsl:attribute name="class">
            <xsl:text>dragClass</xsl:text>
          </xsl:attribute>
          <userdata key="gridData_rowItemID" value=" " />
          <td>
            <xsl:value-of select="item_number"/>
          </td>
          <td>
            <xsl:value-of select="id/@keyed_name"/>
          </td>
          <td>
            <xsl:value-of select="ancestor::Item[1]/quantity"/>
          </td>
          <xsl:apply-templates select="Relationships/Item/related_id/Item[@type='Part']"/>
        </xsl:element>
      </xsl:template>
    </xsl:stylesheet>
    

    we'll get xml, ready for TreeGridContainer.InitXML:

Children
No Data