Colspan + Rowspan within a #PRIM_LIST

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
wainwrightj
Posts: 2
Joined: Wed Apr 10, 2019 8:59 pm

Colspan + Rowspan within a #PRIM_LIST

Post by wainwrightj »

Hello,

Does anyone know if there's a way to split the cells of a data table to allow more than one field to be shown in the same row

So that the row can contain a full size item and then two smaller items as seen below?
Image

Thanks in advance

Josh
User avatar
lawingo
Posts: 78
Joined: Fri Dec 04, 2015 6:41 am

Re: Colspan + Rowspan within a #PRIM_LIST

Post by lawingo »

Hey Josh,

What version of Lansa are you using?

In Lansa 14, create a layout with 2 columns. In your 2nd column drop, a Panel and set the size to "fit Both." Create a layout for the Panel and set it to 2 rows

Best,
Chad

Here's an example:

Code: Select all

* **************************************************
*
*  COMPONENT:  STD_FORM
*
* **************************************************
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Clientwidth(595) Clientheight(375) Componentversion(2) Left(529) Top(197) Layoutmanager(#LayoutMain)

Define_Com Class(#PRIM_TBLO) Name(#LayoutMain)
Define_Com Class(#PRIM_TBLO.Column) Name(#LayoutMainColumn1) Displayposition(1) Parent(#LayoutMain)
Define_Com Class(#PRIM_TBLO.Column) Name(#LayoutMainColumn2) Displayposition(2) Parent(#LayoutMain)
Define_Com Class(#PRIM_TBLO.Row) Name(#LayoutMainRow1) Displayposition(1) Parent(#LayoutMain)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutMainItem1) Column(#LayoutMainColumn2) Manage(#Panel1) Parent(#LayoutMain) Row(#LayoutMainRow1)

Define_Com Class(#PRIM_TBLO) Name(#Layout)
Define_Com Class(#PRIM_TBLO.Column) Name(#LayoutColumn1) Displayposition(1) Parent(#Layout)
Define_Com Class(#PRIM_TBLO.Row) Name(#LayoutRow1) Displayposition(1) Parent(#Layout)
Define_Com Class(#PRIM_TBLO.Row) Name(#LayoutRow2) Displayposition(2) Parent(#Layout)

Define_Com Class(#PRIM_PANL) Name(#Panel1) Displayposition(1) Left(298) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(0) Height(375) Width(297) Layoutmanager(#Layout)

Evtroutine Handling(#com_owner.CreateInstance)

Set Com(#com_owner) Caption(*component_desc)

Endroutine

wainwrightj
Posts: 2
Joined: Wed Apr 10, 2019 8:59 pm

Re: Colspan + Rowspan within a #PRIM_LIST

Post by wainwrightj »

Thanks for your reply

I am indeed using V14 but I need a data table that gets populated from a file on our server to have split cells instead of a page layout

When you drag the data table control onscreen the code setup in the back ground using #PRIM_LIST and not #PRIM_TBLO as in your example

Is there anyways to achieve the same within the #PRIM_LIST component or is the material design aspect of these apps slightly restrictive in that regard
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: Colspan + Rowspan within a #PRIM_LIST

Post by jyoung »

Look into the List Cell Interface
https://docs.lansa.com/14/en/lansa016/p ... design.htm

It allows you to customize the display of an individual cell with multiple fields.

In your case, your second column could contain the panel described by Chad.

Hope this helps,
Joe
Post Reply