Grid-Add row count 0 for master/add
Hello,
how can I make Grid-Add row count 0 for master/add?
I maked this parameter = 0, but I have 6 rows for default.
Hello,
how can I make Grid-Add row count 0 for master/add?
I maked this parameter = 0, but I have 6 rows for default.
How did you make the param you mentioned? You may post your code or your setting for more discussion.
I have created an master/add. I used only the standard settings in the phpmaker program. I didn't write additional code. I have a master table and 2 additional tables. In one of the tables, I need a person to add a grid for a record there himself. Otherwise, by default, I add data that is not needed.
btrade wrote:
I used only the standard settings in the phpmaker program.
Which setting? From which menu in PHPMaker project? Could you explain it in more detail?
Tools > Advanced settings > Grid-Add row count > 0
for master/add
But I have five grid records when I make it new records.
I need 0 grid record for one table.
Please note that from the logic defined in PHPMaker template, if the Grid-Add row count setting is set to 0 or any value that less than 0, the default value will automatically set to 5.
// Grid add row count
global.gridAddRowCount = PROJ.GridAddRowCount;
if (!gridAddRowCount || gridAddRowCount <= 0)
gridAddRowCount = 5;
So for your case, it is recommended to enter 1 instead of 0 to that setting above.
Where can I add this code?
As mentioned before, the code is located inside the PHPMaker Template.
You may check it out from C:\Users\{user}\AppData\Roaming\phpmaker2023\node_modules\@phpmaker\php2023\shared\config-table.php
file.
It is recommended to create your own Extension if you want to customize the code in PHPMaker Template side.
You may try and use Page_Load server event to set:
$this->GridAddRowCount = 0;
Yes, it works very good.
think so much.