- Sun Sep 01, 2019 3:32 pm
#826281
Dear Amos,
Greetings from Ecuador. I'm working on a process for my micro-lending startup which runs on ProcessMaker 3.3.0-community. At some step of the process I have a Dynaform which shows the user a Payment Table. The table is implemented as a grid variable named "tabla_solicitantes" and populated in a PHP Trigger which fires before the Dynaform. The table's data consists of amounts of money so we would like to display the table in View Mode and to right-align the table's columns. Shown in the figures below is the desired behavior in Edit Mode.
I have been able to right-align the columns in JavaScript for the case when the grid is in Edit mode, but unfortunately the getControl() function does not work when the grid is in View Mode. The code is shown below.
Could you please suggest a way for me to change the grid display mode to View but still be able to align the columns to the right?
Thank you!
Greetings from Ecuador. I'm working on a process for my micro-lending startup which runs on ProcessMaker 3.3.0-community. At some step of the process I have a Dynaform which shows the user a Payment Table. The table is implemented as a grid variable named "tabla_solicitantes" and populated in a PHP Trigger which fires before the Dynaform. The table's data consists of amounts of money so we would like to display the table in View Mode and to right-align the table's columns. Shown in the figures below is the desired behavior in Edit Mode.
I have been able to right-align the columns in JavaScript for the case when the grid is in Edit mode, but unfortunately the getControl() function does not work when the grid is in View Mode. The code is shown below.
Code: Select all
$( document ).ready( function()
{
var numRows = getFieldById('tabla_solicitantes').getNumberRows();
for ( var k = 1; k <= numRows; k++)
{
getFieldById('tabla_solicitantes').getControl( k, 1).css( 'text-align', 'right');
getFieldById('tabla_solicitantes').getControl( k, 2).css( 'text-align', 'right');
getFieldById('tabla_solicitantes').getControl( k, 3).css( 'text-align', 'right');
getFieldById('tabla_solicitantes').getControl( k, 4).css( 'text-align', 'right');
}
return;
}
);
Could you please suggest a way for me to change the grid display mode to View but still be able to align the columns to the right?
Thank you!