I have a table which displays the data from database, how can I edit the cell in the table, I don’t want to save the changes back to database, I am just trying to edit the cell value. In table property I have already enabled allowEditOn: single-click but still not allowing the edit the cell data.
If you are using a binding to populate the table, it will smash any edits you make locally every time it updates. You may have to bind to a custom property and decide (in a propertyChange event) when it is appropriate to overwrite the table data. When the script changes the cell locally, you will have to set a flag or set up some state that can be used to decide how to route the DB updates. There’s no magic wand that will resolve the conflicting sources of data for you.
I think I am not explained it clearly, so what i am trying to do is I have a table called expense in database which have a boolean column called “selected”, so when i am retrieving that table in perspective table it shows a check box for that boolean column which is “selected”. I want to check that check box in run time so that i can select some rows in the table and perform some action on that rows, i don’t want to save that back to database i just want see which check boxs are selected in run time. But perspective table is not allowing to check the check box on run time.
I don’t have columns since data is fetched from database, I have allowEditOn which enabled still its not allowing to edit. and check box is not grayed out or disabled. I can’t edit any cells including cells containing text
Its working when set individual column prop, now i can check the check box but when i try to check multiple check boxes its not working. Only one row check box can be selected at a time.
Ya, the above figure is screen shot of my table, i am trying to select multiple row using check boxes and when i press the above button “approve all”, status column in the database should be updated for this selected rows
This is a bit more complex. You’ll need an unique ID (per row) on your table data that get transferred to the props.selection.data buffer (don’t forget to go with enableRowSelection: true), and change my previous event code for a loop cycling through that buffer and change the data to the source (props.data).