Open KyooMario opened 4 years ago
try adding and removing rows externally through java script and jquery.this is just a work around
steps to delete row: 1.create a buttons for remove row inside the column of grid component. 2.Choose 'custom' action for the button , from 'Action' select box. 3.give our custom action in the javascript code, eg: deleteDataGridRow(event,'projectContact') /**
steps to add row: 1.create a buttons for add row outside the column of grid component(just a normal button o add row). 2.Choose 'custom' action for the button , from 'Action' select box. 3.give our custom action in the javascript code, eg:addDataGridRow(event,'projectContact');
/**
@param gridName : specific grid name to edit
*/ function addDataGridRow(event,gridName) { let dataGridComp = FormioUtils.getComponent(currentForm.components,gridName,true); dataGridComp.addRow(); }
Thanks but I would rather wait for a option split.
We would be open to splitting this into two separate options but don't have plans to do this at the moment. Is this something you would like to contribute?
@ganimuhammad
I decided to use your solution but can you give me some extra help: I want to add a value to a field in the new row and am not sure how to target this.
Kind regards, Mario
@KyooMario please be specific. do you want to add a default value or a calculated value?
@KyooMario, can you please tell me what is the option to disable both adding and removing?
We would be open to splitting this into two separate options but don't have plans to do this at the moment. Is this something you would like to contribute?
HI Randall ... How can we become a contributor? We would like to improve this component and others.
Hello @ricardophone2b, We welcome Pull Requests.
We're currently addressing a backlog of GitHub issues. Closing this thread as it is outdated. Please re-open if it is still relevant. Thank you for your contribution!
hello guys , did the option for DataGrid: Disable Adding / Removing Rows separately Any chance to separate the 2 options? has come , can i do it ??
or is there any simpler way , any suggestions
I would like to disable removing but enable adding ;-) Any chance to separate the 2 options?
Kind regards, Mario