# Passing row data to row's subview

**URL:** <https://forum.inductiveautomation.com/t/passing-row-data-to-rows-subview/86471>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 27, 2024, 10:13pm UTC](https://forum.inductiveautomation.com/t/passing-row-data-to-rows-subview/86471 "2024-02-27T22:13:40Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [February 27, 2024, 10:13pm UTC](https://forum.inductiveautomation.com/t/passing-row-data-to-rows-subview/86471/1 "2024-02-27T22:13:40Z")

</div>

This is basic, I search but cannot find it on manual.

On tables subview parameters, how do I pass the row's data into the row's subview?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 27, 2024, 10:18pm UTC](https://forum.inductiveautomation.com/t/passing-row-data-to-rows-subview/86471/2 "2024-02-27T22:18:01Z")

</div>

It is automagically passed as the `value` parameter. (Distinct from column views, where it is passed as the `rowData` parameter.)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 27, 2024, 10:28pm UTC](https://forum.inductiveautomation.com/t/passing-row-data-to-rows-subview/86471/3 "2024-02-27T22:28:22Z")

</div>

There's an example:

> **[Displaying a Subview in a Table Row | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-display-palette/perspective-table/displaying-a-subview-in-a-table-row)**
>
> In a Perspective Table component, you have the option to enable subviews. When a subview is set up, you can click on the Expand icon and have another view display without closing the first view. This example sets up a table with several city...

---

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [February 27, 2024, 10:29pm UTC](https://forum.inductiveautomation.com/t/passing-row-data-to-rows-subview/86471/4 "2024-02-27T22:29:49Z")

</div>

Thank you.

On my subview:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/c/9cd1a2f43bb5252a1e026cd2c9c4a3e560d39145.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 27, 2024, 10:32pm UTC](https://forum.inductiveautomation.com/t/passing-row-data-to-rows-subview/86471/5 "2024-02-27T22:32:27Z")

</div>

When designing the subview you need to enter some placeholder data there. When you run the Preview on the view containing the main table it should show up.

---

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [February 27, 2024, 10:37pm UTC](https://forum.inductiveautomation.com/t/passing-row-data-to-rows-subview/86471/6 "2024-02-27T22:37:01Z")

</div>

> [@Transistor](#):
>
> There's an example:
> 
> [Displaying a Subview in a Table Row | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-display-palette/perspective-table/displaying-a-subview-in-a-table-row)

I stand corrected. Thank you.

This:

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/1/21bcc4e62a685a02eeaa9bf99695e1ec11259ec6.png)

Seems that row and rowIndex returns the same value.

---

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [February 27, 2024, 10:43pm UTC](https://forum.inductiveautomation.com/t/passing-row-data-to-rows-subview/86471/7 "2024-02-27T22:43:13Z")

</div>

I have problem with height of subview.

My subview is a table within a flex container.  
The table has only fiew rows.  
When I show the subview, that subview's table is very tall..  
How can I make it auto.. There should be a way to make height of subview auto..

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 27, 2024, 10:45pm UTC](https://forum.inductiveautomation.com/t/passing-row-data-to-rows-subview/86471/8 "2024-02-27T22:45:29Z")

</div>

On the subview table set  
`virtualized : false`.

---

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [February 27, 2024, 10:48pm UTC](https://forum.inductiveautomation.com/t/passing-row-data-to-rows-subview/86471/9 "2024-02-27T22:48:41Z")

</div>

> [@Transistor](#):
>
> On the subview table set  
> `virtualized : false`.

I did. 🙂 I was the one who ask this long time ago..

The subview property should able to know, the height of the view..  
I can try with other views and see..

edit: I see that, the subview is using the default size (fix) of the view.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 27, 2024, 10:56pm UTC](https://forum.inductiveautomation.com/t/passing-row-data-to-rows-subview/86471/10 "2024-02-27T22:56:20Z")

</div>

You _are_ using a flex view for the subview?

---

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [February 27, 2024, 11:06pm UTC](https://forum.inductiveautomation.com/t/passing-row-data-to-rows-subview/86471/11 "2024-02-27T23:06:43Z")

</div>

Yes. With one component Table. grow set to 1, virtualize set to False.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 27, 2024, 11:13pm UTC](https://forum.inductiveautomation.com/t/passing-row-data-to-rows-subview/86471/12 "2024-02-27T23:13:37Z")

</div>

And the subview's `POSITION.basis` prop? Should that be set to `auto`?  
Oh, I'm tired!

---

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [February 27, 2024, 11:21pm UTC](https://forum.inductiveautomation.com/t/passing-row-data-to-rows-subview/86471/13 "2024-02-27T23:21:57Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/f/7fae83aa2a94cbcbb8a5f376947ad6f56a1e2dbc.png)

Main view's table setting:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/b/8b66a3caa9e7275f2eafce6d11ba49adad0de8a4.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/2/72c385edfa37a26f2b14904ebfad740ea3bd4a36.png)

Subview's setting:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/3/13d718e58a54cce5fdc9b0b0f24c3c22a7b4df6c.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/b/7baf9842a7ea7ff3a983fb4d43b6d4f4b2266886.png)

> [@Transistor](#):
>
> Oh, I'm tired!

Yep, sorry..  
All are up there.., not working, so we can take a break first..

---

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [February 27, 2024, 11:28pm UTC](https://forum.inductiveautomation.com/t/passing-row-data-to-rows-subview/86471/14 "2024-02-27T23:28:57Z")

</div>

I see the culprit..  
The subview of table's row, is rendered as "Row Flex"

idontknow... just from observation

---

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [February 27, 2024, 11:38pm UTC](https://forum.inductiveautomation.com/t/passing-row-data-to-rows-subview/86471/15 "2024-02-27T23:38:45Z")

</div>

I think there is now way, to make subview (a table), resize automatically.  
I guess I will dynamically program the default height according to number of rows.

---

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [February 27, 2024, 11:41pm UTC](https://forum.inductiveautomation.com/t/passing-row-data-to-rows-subview/86471/16 "2024-02-27T23:41:55Z")

</div>

even label does not auto adjust subview's height:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/e/ae7241c371507e1dd9b5af901159ce42196d06df.png)
