jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Checkboxes disappears when column has cellsrenderer › Reply To: Checkboxes disappears when column has cellsrenderer
Hi
I have a few questions related to the above context, as I am facing a similar issue:
——-
Idea 1:
——-
Is it possible to “call” this “built-in rendering” out of a custom “cellsrenderer” somehow? This way, one could use the default cell rendering on rows that shall show a checkbox and display some custom stuff on other rows. Something like this:
myCellsRenderer = function (row, columnfield, value, defaulthtml, columnproperties) {
if (row == 0)
return <built-in-renderer>(row, columnfield, value, defaulthtml, columnproperties);
else
return <my-custom-html>;
}
——-
Idea 2:
——-
Conditionally disabling checkboxes for some rows (not just ignoring clicking by returning false from “cellbeginedit”) could also be done by JQuery (something like “$(myElement).jqxCheckBox(‘disable’)”).
But I am still looking for the right place to do so. “bindingcomplete” event is too early, as the checkboxes have not yet been created at that time (at least it looks like this for me). So, where could I put the JQuery code that enables / disables the checkboxes the way I would like to?
——-
Idea 3:
——-
If I create the checkboxes by myself using “createwidget” / “initwidget”, how can I link / bind the checkbox to the cell it belongs to, so the cell data is updated automatically (if I provide a “change” event handler for the checkbox, it has no parameter that gives me some kind of row reference)?
——-
It would be really great if you could tell me, if one of my above ideas is somehow practicable, or if there is another way to conditionally enable / disable the checkboxes (I know that there are several discussions about that checkbox / grid topic and that it is probably not that easy) …
Regards
Roger