formio / formio.js

JavaScript powered Forms with JSON Form Builder
https://formio.github.io/formio.js
MIT License
1.89k stars 1.07k forks source link

DataGrid: Disable Adding / Removing Rows separately #2374

Open KyooMario opened 4 years ago

KyooMario commented 4 years ago

I would like to disable removing but enable adding ;-) Any chance to separate the 2 options?

Kind regards, Mario

ganimuhammad commented 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');

/**

KyooMario commented 4 years ago

Thanks but I would rather wait for a option split.

randallknutson commented 4 years ago

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?

KyooMario commented 4 years ago

@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

ganimuhammad commented 4 years ago

@KyooMario please be specific. do you want to add a default value or a calculated value?

ahka01 commented 3 years ago

@KyooMario, can you please tell me what is the option to disable both adding and removing?

ricardophone2b commented 3 years ago

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.

wag110894 commented 3 years ago

Hello @ricardophone2b, We welcome Pull Requests.

jeriah-formio commented 9 months ago

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!

PRO-Nitesh commented 1 month ago

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