ryansuitposungkono / openjs-grid

Automatically exported from code.google.com/p/openjs-grid
0 stars 0 forks source link

Feature Request: Add toggle to support turning on/off editing #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I noticed that setting a link option in conjunction with making a column 
editable is in the "mutually exclusive" category.  It made me consider that it 
would be extremely useful to have a flag turn on/off the editing on the 
javascript side of the grid.

This would allow for creating readonly modes vs. edit modes quickly, as well as 
providing the ability to click on a link but still edit it if need be.

My suggestion would be to have an event developers can utilize with some 
options to trigger it easily; i.e. keypresses and/or button clicks.

Having this coincide with your config as attributes system would be fabulous.

Original issue reported on code.google.com by vep....@gmail.com on 12 Mar 2011 at 12:52

GoogleCodeExporter commented 9 years ago
You should be able to make any column editable or non editable with just 
javascript. Because those inline attributes are turned into the columnOpts 
object you can access that after the grid loads.

$grid.data().columnOpts['columName'].editable

Original comment by Seancla...@gmail.com on 14 Mar 2011 at 4:36

GoogleCodeExporter commented 9 years ago
Is the .editable only restricted to columns or can it be used to lock out a row 
or a individual cell?  The row or cell based lockout would be useful depending 
on certain security arrangements - i.e. you're able to edit certain fields 
under certain conditions but not others.

Specific example:  Say I have an app with an admin table with a bunch of 
true/false checkbox toggles for permissions.  As a power-user, I am allowed to 
edit the permission flags for all users except actual admins.  However, I am 
allowed to view certain attributes of an admin record.  Rather than generate 2 
grids, one grid should be able to handle that logic?

Curious as to your thoughts.

Vincent

Original comment by vep....@gmail.com on 15 Mar 2011 at 4:24