ParamQuery grid support forum
General Category => Help for ParamQuery Grid (free version) => Topic started by: p38 on September 07, 2021, 03:48:55 am
-
Is there anyway to block pqgrid from adding new rows if they paste a number of rows greater than current rowcount?
I find that pasting data inserts extra row if the paste data is more then the row count.
eg: if I have 10 rows and I paste 15 rows, pqgrids adds another 5 rows.
I cant find anywhere a setting to limit adding new rows.
for example a maxRowCount and maxColCount would be handy to have, if set, wont allow pqgrids to add more rows/columns than these values.
Many thanks.
-
Hi Admin, any feedback perhaps?
I am of the opinion this is a bug, if one sets the max rows, and you try and paste more than the max rows, it should not allow this, or alternatively there should be a setting to allow this.
-
Sorry for late reply.
It can be done in beforeValidate, check if ui.source == 'paste' and there are objects of type: 'add' in ui.rowList, then remove them.
https://paramquery.com/api#event-beforeValidate