I know there are onSubviewExpand and onSubviewCollapse events built into the Table component, but is there a function I could use in an onRowClick event script to expand and collapse a subview?
I am trying to make it so that clicking anywhere on a row will open the subview to that row.
Thank you.
10 Likes
I am also trying to achieve same functionality. For most of the use cases it would be best to open subview by clicking the row no matter where to click
5 Likes
Do you have an image of the functionality in case I don't understand?
I saw it is listed as planned I think.
Do you mean like the context menus that are new?
New Feature: Component Context Menu]
I don't have 8.1.25, haven't tried them myself.
I am passing parameters and navigating to a page when I click a row sometimes.
I would benefit from faster ways to show table construction information.
I would benefit from faster ways to show subset views based on row data.
I am not sure if the tools exist already and I don't know about some good capabilities already possible.
The functionality I was after was being able to click anywhere in a table row and have that call a function to expand the row's subview... There is no way to do this programmatically, you just have to click on the arrow to open the row subview
I was able to place this as part of the onRowClick
Event of the Table:
def runAction(self, event):
self.expandSubviews([event.rowIndex])
it resulted in the Table expanding the subview for whichever row I clicked.
5 Likes
Can you show me an example of unexpanded and expanded?
I thought it would require an event script to hide/unhide something, and setting row information to a custom property.
Didn't know about the function. I will try to try it.
I am missing something. When I click on my rows, nothing happens.
I found an example. Displaying a Subview in a Table Row - Ignition User Manual 8.1 - Ignition Documentation]
I believe you should have used event.row instead of rowIndex here.
Your script will break if the table is filtered.
2 Likes