Skip to content
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’ll 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
Closed

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

evilripper opened this issue Mar 8, 2018 · 2 comments

Comments

@evilripper
Copy link

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
Copy link

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
Copy link
Owner

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants