jqGrid Editing – override logic to define cell value

eLVik

Quotation from wiki for checkbox:

defines a checkbox; when the value is Yes, the checkbox becomes checked, otherwise it is unchecked. This value is passed as a parameter to the editurl.

If in editoptions, the value property is not set, jqGrid searches for the following values (false|0|no|off|undefined) in order to construct the checkbox. If the cell content does not contain one of these values, then the value attribute becomes the cell content and offval is set to off.

I use form editing and want take value for checkbox not from cell content, but from attribute data-val, which I define myself on loadComplete event handler.

before loadComplete:

<td aria-describedby="data_grid_col1" title="0" style="" role="gridcell">0</td>

after loadComplete:

<td aria-describedby="data_grid_col1" title="0" style="" role="gridcell" data-val="0">Some content like NO</td>

Is there some event, or some another way to achieve this?

Thank you.

Oleg

If you need to change content of cell you should use custom formatters. If you need set some attributes on the cell you should use cellattr callback.

The answer demonstrates setting of colspan attribute, this one sets colspan. Another answer demonstrates setting of title attribute. In the same way you can set any other attribute on the cells (<td> elements).

Usage of loadComplete is less effective. See the answer for more information.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to get the value of formatted cell value of a row in jqgrid

From Dev

jqGrid - Conditionally format cell based off Date value

From Dev

get text from jqgrid cell value

From Dev

jqgrid - save data for inline editing

From Dev

Change NSTableView cell value While Editing

From Dev

How to make element sizes to fill cell sizes and increase font in free jqgrid inline and form editing

From Dev

jqGrid - Select selected cell's text while inline editing

From Dev

JQGrid Change Value Of Cell While Changing Another Cell

From Dev

free-jqGrid - The numeric value is displayed instead of the text for select cell

From Dev

Editing all raster cell values above a certain value in R

From Dev

jqGrid form editing select ordering

From Dev

jqGrid: How to add a row in "cell editing" model?

From Dev

Change JQGrid Cell value on Button Click

From Dev

Autoreload jqgrid and stop when editing

From Dev

How to get the particular cell value in JQgrid

From Dev

jqGrid - how to focus cell inline editing

From Dev

jqGrid 4.8.0 - How to get cell type or cell value using jsonmap

From Dev

How to set row id value after form editing in free jqgrid

From Dev

How to make element sizes to fill cell sizes and increase font in free jqgrid inline and form editing

From Dev

JQGrid remove cell value from custom error message in inline editing

From Dev

How to get "Column Name" and "Previous Value" from Cell Editing Grid

From Dev

JQGrid Change Value Of Cell While Changing Another Cell

From Dev

JqGrid getRowdata gives cell value on a row as string

From Dev

jqgrid - cell data lost when editing before saving

From Dev

PyQt5 QTableView cell editing behaviour - superimposition of original value

From Dev

How to combine cell value to column name with CASE logic in SQL

From Dev

Count in VBA (Excel) with a define value in an Excel Cell

From Dev

FOSUserBundle override Login logic

From Dev

free-jqgrid editing a column with edittype: "checkbox", editoptions.value: "1:0" doesn't work

Related Related

  1. 1

    How to get the value of formatted cell value of a row in jqgrid

  2. 2

    jqGrid - Conditionally format cell based off Date value

  3. 3

    get text from jqgrid cell value

  4. 4

    jqgrid - save data for inline editing

  5. 5

    Change NSTableView cell value While Editing

  6. 6

    How to make element sizes to fill cell sizes and increase font in free jqgrid inline and form editing

  7. 7

    jqGrid - Select selected cell's text while inline editing

  8. 8

    JQGrid Change Value Of Cell While Changing Another Cell

  9. 9

    free-jqGrid - The numeric value is displayed instead of the text for select cell

  10. 10

    Editing all raster cell values above a certain value in R

  11. 11

    jqGrid form editing select ordering

  12. 12

    jqGrid: How to add a row in "cell editing" model?

  13. 13

    Change JQGrid Cell value on Button Click

  14. 14

    Autoreload jqgrid and stop when editing

  15. 15

    How to get the particular cell value in JQgrid

  16. 16

    jqGrid - how to focus cell inline editing

  17. 17

    jqGrid 4.8.0 - How to get cell type or cell value using jsonmap

  18. 18

    How to set row id value after form editing in free jqgrid

  19. 19

    How to make element sizes to fill cell sizes and increase font in free jqgrid inline and form editing

  20. 20

    JQGrid remove cell value from custom error message in inline editing

  21. 21

    How to get "Column Name" and "Previous Value" from Cell Editing Grid

  22. 22

    JQGrid Change Value Of Cell While Changing Another Cell

  23. 23

    JqGrid getRowdata gives cell value on a row as string

  24. 24

    jqgrid - cell data lost when editing before saving

  25. 25

    PyQt5 QTableView cell editing behaviour - superimposition of original value

  26. 26

    How to combine cell value to column name with CASE logic in SQL

  27. 27

    Count in VBA (Excel) with a define value in an Excel Cell

  28. 28

    FOSUserBundle override Login logic

  29. 29

    free-jqgrid editing a column with edittype: "checkbox", editoptions.value: "1:0" doesn't work

HotTag

Archive