I am using Jquery Datatable Editable. I wanted to know if it is possible to make a cell editable based on a condition.
For example if my data is rendered this way,
Key text
1 Help
2 Choice
3 Edit
Key and Text are 2 columns, I want to make the cell with value choice only editable and the cells with value Help and Edit remain readonly. Is it possible to achieve this via Datatable editable ?
You may use jEditable js to make a particular class editable. Click HERE.
Related
I have a kendo ui spreadsheet which I would like to display remote data and based on a value disable an entire row to prevent user form editing it rather than a cell. Is there any way todo this?? Similar like inline edit for a kendo grid but in this case I would like to edit only certain rows within the spreadsheet??
You could use a range and then disable the whole range. As presented here:
https://demos.telerik.com/kendo-ui/spreadsheet/disabled-cells but with rows rather then columns.
I want to disable 1 row on my grid depending on the value of a global javascript variable. For example, lets say the value of this variable is 123. Then any row which has 123 in a column called "XYZ" should be disabled.
where would be the best way to implement such a functionality ? inside loadcomplete or beforeselectrow ?
Thanks
The best way for inline editing mode is adding not-editable-row class to the row. You can use rowattr to add the class based on the content of some column. See the answer for details.
If you use form editing you have to choose another way. It you use navGrid then you can disable some editing or hide buttons based on the value in the column of selected row. See the answer and this one for more details. beforeSelectRow is good place for such changes.
I have created JQGrid.
I have put the Data in cell and one html Link in cells.
OnClick of that link I need to open JQGrid Specific popUp.Popup have one combobox .I'll select one option and click submit button and that data needs to be appear in clicked cell.
Thanks
The construction which you suggest seems me too complex. Probably you can consider to use more simple user interface?
Nevertheless you can just use setCell method to set new contain of the cell of the grid.
I have a grid with multiple columns and I use the first column for a row label. I looked at the example for making the grid editable, but that appears to make the whole grid editable. Is there away to specify a certain column(s) only?
Got it! By not setting the editor property on the column object the column is non-editable.
I have a jqgrid that has several columns including a checkbox column that indicates if an item is selected.
Underneath that I have a dropdown menu and a text box. The idea is that each item in the dropdown menu is a column in the jqgrid. Then all I need to do is modified all of the checked rows with the contents of the text box for that column. So a quick mass update mechanism if you will.
The problem is, is that I can't figure out how to update a specific cell. Any tips or documentation that can help me? Thanks!
You can use for example setRowData (see jqGrid documentation) or setCell to update the data in the grid. The functions getCol, getCell or getRowData could help you the examine the row data. Another old answers: this and this could be helpful if you decide to search data in the grid with respect of jQuery.
Here's the "answer" I came up with to my problem. I wanted to edit only rows that were editable. Using setCell would overwrite my editable field with a non-editable one. So I looked at the HTML for a given row while it is in the edit state and passed that into the 'setCell' method. It feels 'hackish' though and if someone knows a better way, I'm all ears.