Hi, congrats for gijgo, it's very useful! 👍
I'm trying to add a row to grid to INSERT new record directly in the grid without annoying popup, but I have a problem with the edit metod!
When I set in edit a row the buttons don't change (is it a bug?), I made a spaghetti code for a stupid workaround! :)
` $('#btnAddRecord').on('click', function () {
var tempId =- 1;
grid.addRow({ 'Id': tempId, 'Name': '', Nationality :'', Created:'' });
var editButton = $("button[data-key='" + tempId + "']").find('span.glyphicon-pencil').parent();
var cancelButton = $("button[data-key='" + tempId + "']").find('span.glyphicon-ban-circle').parent();
var deleteButton = $("button[data-key='" + tempId + "']").find('span.glyphicon-remove').parent();
var updateButton = $("button[data-key='" + tempId + "']").find('span.glyphicon-ok').parent();
editButton.hide();
deleteButton.hide();
cancelButton.show();
updateButton.show();
grid.edit(tempId);
//no workaround see the image
grid.edit(10);
});
`
The text was updated successfully, but these errors were encountered:
Hi, congrats for gijgo, it's very useful!👍
I'm trying to add a row to grid to INSERT new record directly in the grid without annoying popup, but I have a problem with the edit metod!
When I set in edit a row the buttons don't change (is it a bug?), I made a spaghetti code for a stupid workaround! :)
` $('#btnAddRecord').on('click', function () {
var tempId =- 1;
grid.addRow({ 'Id': tempId, 'Name': '', Nationality :'', Created:'' });
var editButton = $("button[data-key='" + tempId + "']").find('span.glyphicon-pencil').parent();
var cancelButton = $("button[data-key='" + tempId + "']").find('span.glyphicon-ban-circle').parent();
var deleteButton = $("button[data-key='" + tempId + "']").find('span.glyphicon-remove').parent();
var updateButton = $("button[data-key='" + tempId + "']").find('span.glyphicon-ok').parent();
editButton.hide();
deleteButton.hide();
cancelButton.show();
updateButton.show();
grid.edit(tempId);
//no workaround see the image
grid.edit(10);
});
`
The text was updated successfully, but these errors were encountered: