neokoenig / jQuery-gridmanager

A way of building rows and grids with built in editable regions; requires jQuery, jQueryUI, Bootstrap 3.x, & optional TinyMCE or CKEditor
http://neokoenig.github.io/jQuery-gridmanager/
461 stars 129 forks source link

Can we have only few columns to be uneditable in a row #61

Closed dskumar001 closed 9 years ago

dskumar001 commented 9 years ago

Hi, I need some of the columns content need not to be changed. So, Can i have only few columns to be uneditable in a row.

I tried with editableRegionEnabled as false. But it is making all columns as uneditable. Please help me out.

Thanks

neokoenig commented 9 years ago

Hmm, it's really not built to do that. The only way I can think of is by adding a certain class, i.e like 'uneditable' to the column and then manually removing the GM specific classes on load. It's probably not going to work though, as when you do things like switch to preview mode and back again, or code view, you'll re-run the activation process etc.

You might be able to do it via the filterCallback option ?

dskumar001 commented 9 years ago

Thanks neokoenig for quick response.

If at all we don't provide switching from preview mode and back again, or code view, Will this be possible by adding certain classes

neokoenig commented 9 years ago

Ok, this is a bit of a ugly hack, and only works if you don't use a rich text editor; The idea is any column with .noneditable has it's editable functionality removed on the filterCallback. It's still draggable, but the actual content isn't editable

https://gist.github.com/neokoenig/1614b229cdbbba5799d4

dskumar001 commented 9 years ago

Thanks a lot neokoenig. It will be very helpful for me to move on further.