jQWidgets Forums

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • Hi

    The showArrow property still doesn’t work (jqWidgets v.4.3). Any news about when this will be fixed?

    Regards
    Roger Ammann

    Hi Peter

    I am well aware of the risks of this kind of code, and I usually don’t like it either (have been working as a SW engineer for about 20 years now) …

    But I found no other possibility to enable / disable or show / hide checkboxes in a grid depending on row data so far.

    That’s why I asked for ideas about how to do it until it may be supported by the grid out of the box one day …

    Regards
    Roger

    Hi Peter

    Well, I must say that I had hoped for a little bit more details …

    Regards
    Roger

    P.S.:
    “createwidget” / “initwidget”, together with a bit of JQuery “magic” can do the job. Took me a few hours and a few dozen lines of code, but works … Thus, “None of these ideas are possible” is not quite true …

    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

    Hi Dimitar

    Well, that’s a step into the right direction, but the checkboxes in the placeholder rows are still there, which is quite ugly in my opinion …

    Therefore, I tried to find another solution, which cost me quite a bunch of hours, but finally worked:

    – I create a custom checkbox widget in the “createwidget” callback for all rows having “row.bounddata.empty” set to false [Placeholder rows have it set to true] and add it to the “htmlElement”, which is a callback parameter [Grid settings are “virtualmode: true”, “scrollmode: default”]

    – In the “initwidget” callback, I initialize the checkbox widget state according to row data and add a custom attribute to “htmlElement” to identify the row in the widget’s “change” event handler [for updating row data upon modifications by user]

    I did not find a way yet to bind the custom widget directly to row data [to get rid of the custom attribute], but after all, it does not seem an impossible task to get rid of these checkboxes in placeholder rows …

    Thus, I am still wondering a bit, why they are displayed …

    Would it be really so complicated for you to update jqxGrid to provide this out of the box ???

    Regards
    Roger

    Hi,

    I would like to know whether there are any news concerning these placeholder rows in connection with checkboxes (just stumbled over this problem and found this forum topic), as the last post is about half a year old …

    Regards
    Roger

Viewing 6 posts - 1 through 6 (of 6 total)