Closed drgnbear closed 4 years ago
Hi drgnbear,
Sorry for late reply.
maxRowsAllowed
was not migrated from v1 yet.
I will try to introduce it to v2 very soon.
Thanks!
I actually figured out an easy work around that has the exact same effect. I can send you the code if you are Interested it may be easier than migrating it. Or at least will give people a quick way to do the same thing in the meantime.
On Dec 16, 2019, at 9:58 PM, Albert L. notifications@github.com wrote:
Hi drgnbear,
Sorry for late reply. maxRowsAllowed was not migrated from v1 yet. I will try to introduce it to v2 very soon. Thanks!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
afterRowAppended: function (caller, parentRowIndex, addedRowIndex) {
// Make sure AppendGrid is initialized
if (weatherAppendGrid) {
// Copy data of Foo
from parent row to new added rows
var parentValue = weatherAppendGrid.getCtrlValue("foo", parentRowIndex);
for (var z = 0; z < addedRowIndex.length; z++) {
weatherAppendGrid.setCtrlValue("foo", addedRowIndex[z], parentValue);
}
//Prevent more than 3 weather cards var rowCount = weatherAppendGrid.getRowCount();
if (rowCount > maxRows) { weatherAppendGrid.removeRow(rowCount - 1); } else if (rowCount === maxRows) { $('.appendgrid-add').hide(); } } }, afterRowRemoved: function (caller, rowIndex) { var rowCount = weatherAppendGrid.getRowCount();
if (rowCount < maxRows) { $('.appendgrid-add').show(); } }
On December 16, 2019 at 9:58 PM, "Albert L." notifications@github.com wrote:
Hi drgnbear,
Sorry for late reply. maxRowsAllowed was not migrated from v1 yet. I will try to introduce it to v2 very soon. Thanks!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Where did maxRows allowed and it's callback go. I need that feature or a way to program it. There is no beforeRowAdded callback which is what I expected to find. How can I limit the number of rows they are allowed to add?