New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

grid.edit(id) not changes the buttons. #289

Closed
evilripper opened this Issue Mar 8, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@evilripper

evilripper commented Mar 8, 2018

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!

error

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);
});
`

@stvowi

This comment has been minimized.

stvowi commented Mar 8, 2018

There should/ could be a new button in the thead area over the other command buttons to insert on new row on the top of the table....

Inspiration:https://demos.telerik.com/kendo-ui/grid/editing-inline

@atatanasov atatanasov closed this in 24a58ef Mar 9, 2018

@atatanasov

This comment has been minimized.

Owner

atatanasov commented Mar 9, 2018

We fixed that in the new development build. You can find the new build in the dist folder at github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment