jQuery UI Widgets Forums Grid Custom checkbox in grid

This topic contains 3 replies, has 2 voices, and was last updated by  ioana 10 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Custom checkbox in grid #50150

    ioana
    Participant

    Hi jqWidgets team,

    I am using the http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/index.htm#demos/jqxgrid/customrowcelledit.htmm example, but instead of “true” and “false” values need to have the checkbox displayed (so not only in edit mode).
    Is there any way to achieve this?

    Regards,
    Ioana

    • This topic was modified 10 years, 5 months ago by  ioana.
    Custom checkbox in grid #50159

    Dimitar
    Participant

    Hello Ioana,

    This can be achieved by setting the columntype to “checkbox”, but this will apply to all cells in the column. If you need to have checkbox only in particular rows, you can use cellsrenderer, as shown in the forum topic Query regarding grid column. In this case, however, you will be able to use only the default checkbox and not jqxCheckBox.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Custom checkbox in grid #50170

    ioana
    Participant

    Hi Dimitar,

    thank you for the quick answer.
    I have already tried the approach you proposed. The problem is, I can not set the “editable:false” for the column text, as in the provided example (” { text: ‘Units In Stock’, datafield: ‘UnitsInStock’, cellsalign: ‘right’, cellsrenderer: cellsrenderer, width: 100, editable: false }”).
    The reason is that the grid is customized in such way that it is possible to have just one cell in the row/column that is a checkbox. All other cells in the same row/column are for example dropdowns (for example).
    In order to accomplish this, I used initeditor, geteditorvalue and cellbeginedit as well as the jqxCheckBox element.

    I guess you have a picture in mind about what happens in this scenario.
    Is there a solution for this scenario?

    Regards,
    Ioana

    • This reply was modified 10 years, 5 months ago by  ioana.
    Custom checkbox in grid #50172

    ioana
    Participant

    Hi again,

    I found the solution in http://www.jqwidgets.com/disable-editing-of-a-grid-row-or-cell/

    Regards,
    Ioana

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

You must be logged in to reply to this topic.