Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By kleung
#829572
Hi,

Grateful if I can be advised the methods of getting the number of columns of a grid by
1) javascript in dynaform and
2) php in trigger.

Thousand Thanks.

cheers,
karl
User avatar
By kirkwg
#829573
Hello Karl,

Long time no see you in here....
Since there is no getNumberColumns() function for Grid, meant you need to write your own function.

Give you some hints on JS to do that:
1/ var gValues = $("#grid_id").getValue(); //get all values
2/var columns = gValues[0].length;

For trigger:
you could pass your columns to a hidden_variable or case variables
At trigger, retrieve back the hidden_var or case_var

Good luck , better try it, cheers.
By kleung
#829574
Hi Kirk,

How are you?
Yes, haven't post message here for some time, especially after the departure of Amos.

Thank you for your advice. I'll try them.

cheers,
Karl
By kleung
#829577
Hi,

Accidentally, in https://www.pmusers.com/index.php/Copy_Grid, I found the following codes can also obtain the number of columns of a grid.

var aCols = $('#gridID').getInfo().columns;
var gColNo = aCols.length;

cheers,
Karl

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]

Experience heightened pleasure with Cenforce 100 M[…]