Hello,
I?m currently using the "Batch Editing" feature in ParamQuery, and I need to assign default values for certain columns.
For example, when I click the "New Product" button, it triggers grid.addRow. I?d like to know if there?s a way to define default values directly in the colModel, something like a dataValue property, so that addRow can automatically use those values.
Example:
{title: "Product Name", dataValue: "Test Product ABC"},
{title: "Quantity", dataValue: "1"}
Currently, I?m using an AJAX call to set a cookie when grid.addRow is triggered and then fetching the default values from the cookie after saving. However, this seems like an unnecessary step for what should be a straightforward task.
While I can pass default data to addRow like this:
grid.addRow({newRow: defaultValue});
But, there are cases where I?m adding data via copy-paste, and addRow doesn?t seem to handle those scenarios automatically.
Is there a built-in way to define default values for columns in colModel and have them applied both when grid.addRow is called and when data is added via copy-paste?
In summary, is there any plan to introduce a defaultValue option in the colModel that would also work in Copy+Paste scenarios?
Thanks