bosskmk / pluto_grid

PlutoGrid is a dataGrid for flutter that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS.
https://pluto.weblaze.dev
MIT License
664 stars 305 forks source link

[Help] How to reset/refresh columns state? #882

Closed Retr0sec7 closed 1 year ago

Retr0sec7 commented 1 year ago

So I have some columns that I need to toggle between editable and non-editable. I also have a state variable that toggles between true/false which is set to the enableEditingMode on the columns definition. The problem is that whenever call setState to reload the table and the columns, the columns stays the same and don't toggle between editable and noneditable. I tried to call resetCurrentState and notifyListeners but it doesn't seems to work.

graemep-nz commented 1 year ago

I think you can use the callback PlutoColumnCheckReadOnly instead of setting readOnly true in the constructor. I found this by looking at the readOnly argument in the plutoGrid source code.

https://github.com/bosskmk/pluto_grid/releases/tag/2.7.0

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.