Change Table Column Widths in Microflow/Nanoflow

0
Hi all,   I have a table with two columns of 40% and 60% width. I would like to be able to press a button, and have the 40% column shrink to 0, and the 60% column grow to 100%. Pressing the button again should return them to their former widths.    Is this possible via a nanoflow or microflow? Or, through some other method?    Thanks all for the help.
asked
1 answers
1

Andrew,

  • Create a context entity to contain the table. 
  • This entity can have one attribute called DisplayBothColumns that is a boolean and can be non persistable. 
  • On your page, add a dataview with a nanoflow datasource. 
  • The nanoflow you build should create an instance of your new entity and return it
  • Inside the dataview, create two tables:  one with both columns and another with just one.
  • Make the tables visible based on the value of the DisplayBothColumns attribute
  • Finally, create a nanoflow to switch the attribute from true to false and back again based on the current value (the expression for this is to set the DisplayBothColumns attribute to not(DisplayBothColumns)
  • Put a nanoflow button on your page to call this nanoflow

 That should do it.  Hope that helps,

Mike

answered