Skip to content

Toggle table cells to be editable #3096

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

Closed
chamviptela opened this issue Mar 24, 2015 · 5 comments
Closed

Toggle table cells to be editable #3096

chamviptela opened this issue Mar 24, 2015 · 5 comments

Comments

@chamviptela
Copy link

I've created a table that is non-editable. When toggling an 'Edit' button, I want to change all the cells to editable. When the user clicks 'Edit', I've tried changing the column definition to enableCellEdit and called grid.refresh(), grid.queueGridRefresh(), notifyDataChange('column'), and changed the grid.columns.colDef & called columnRefreshCallback(grid) but none have worked for me. Could you tell me what i'm missing and/or doing wrong?

thanks.

@PaulL1
Copy link
Contributor

PaulL1 commented Mar 24, 2015

Looking at the code for the edit feature, the enableCellEdit property is evaluated only once, at initial cell render. It therefore will be quite difficult to toggle between editable and non-editable. You might be able to achieve it by destroying then re-rendering the enclosing div, which should re-render the entire grid. That's probably not ideal though.

Essentially this is another flavour of #1819

@PaulL1 PaulL1 added this to the 3.0 milestone Mar 24, 2015
@chamviptela
Copy link
Author

Thanks for the prompt response Paul. Indeed, the workaround is not ideal. I will plop ui-grid in a directive and destroy and compile a ui-grid on demand sort of. I'll check out the performance and see if that can satisfy my use case. thanks again.

@uguryilmaz
Copy link

check out this plunker

http://plnkr.co/edit/md9AOA64Zn67KqhNmhZT?p=preview

@stale
Copy link

stale bot commented May 23, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 23, 2018
@stale
Copy link

stale bot commented Jun 22, 2018

This issue has been automatically closed because it has not had recent activity. If you believe that this is still an issue in the latest version, feel free to re-open it. Thank you for your contributions.

@stale stale bot closed this as completed Jun 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants