Andrus
Andrus

Reputation: 27921

How to start inline editing on single click in checkbox column in free jqgrid

I'm looking for a way to start inline editing in jree jqgrid if clicked in checkbox column.

Currently I'm using ClickableCheckBoxFormatter

http://www.ok-soft-gmbh.com/jqGrid/Checkbox.htm

desribed in

http://www.trirand.com/blog/?page_id=393/feature-request/make-disabled-checkbox-of-the-checkbox-formatter-clickable/

and in

how to fix javascript exception if Oleg clickableCheckboxFormatter is used in jqGrid with single click editing

I tried free jqgrid checkbox formatter.

Issues:

How to fix those so that checkbox behaves like ClickableCheckBoxFormatter:

Upvotes: 0

Views: 1364

Answers (1)

Oleg
Oleg

Reputation: 221997

The demo, which you use as the reference, use disabled checkboxes as formatter:

{ name: "closed", width: 70, align: "center", editable: true, formatter: "checkbox",
    edittype: "checkbox", editoptions: {value: "Yes:No", defaultValue: "Yes"},
    stype: "select",
    searchoptions: { sopt: ["eq", "ne"], value: ":Any;true:Yes;false:No" } }

It's the origin of the problem. I would suggest you to use booleanCheckboxFa instead:

{ name: "closed", width: 70, template: "booleanCheckboxFa" },

like on the demo or at least the old formatter: "clickableCheckbox":

{ name: "closed", width: 70, align: "center", formatter: "clickableCheckbox",
    edittype: "checkbox", editoptions: {value: "true:false", defaultValue: "false"} }

like the demo.

Upvotes: 1

Related Questions