jQuery UI Widgets › Forums › Grid › Disable editing a single cell in rowedit mode
Tagged: #jqwidgets-grid, angular grid, bootstrap grid, javascript grid, jquery grid, jqxgrid non-editable cells
This topic contains 5 replies, has 3 voices, and was last updated by rdouglas 6 years, 11 months ago.
-
Author
-
Hi,
I have a grid where the editmode is set to ‘selectedrow’.
I have a scenario where some cells in my grid need to be non-editable.I’m doing something like this :
{ text: 'First Name', columntype: 'textbox', datafield: 'firstname', width: 90, cellbeginedit: function (row) { return column.editableRows[row]; // Can be true for some cells and false for some } }This is similar to the 1st example from here : http://www.jqwidgets.com/disable-editing-of-a-grid-row-or-cell/
However, even if a single cell is editable on a row. The entire row remains editable.
Is there any way in which I can have just a few cells from a row which are non-editable while the rest are editable?
Hi sydney,
Please check if you’re using the latest version of JQWidgets(4.1.2). When only a few cells in a row are non-editable, the rest of them in that row are fully editable. Here is a demo:
https://www.jseditor.io/?key=xb-grid-simpleBest Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comHey Christopher,
If you change the editmode to ‘selectedrow’, it does not work.
Can you check if there’s a possibility to make it work or if you guys don’t support it.Hi sydney,
“SelectedRow” is an edit mode in which you edit an entire row. It’s meant to be used for row editing, not cell editing. Even if you make a cell in a row non-editable and set the editmode to “selectedrow” an entire selected row will be edited. That is the normal behavior. To accomplish what you want, you need to set the editmode to “selectedcell”.
Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comAlright.
Thanks Christopher.
Your demo link no longer works. Can you please fix this. Thanks.
-
AuthorPosts
You must be logged in to reply to this topic.