jQWidgets Forums

jQuery UI Widgets Forums Grid checkbox in Grid

Tagged: ,

This topic contains 5 replies, has 2 voices, and was last updated by  dishmann 7 years, 6 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • checkbox in Grid #96978

    dishmann
    Participant

    my data source contains one or more “Boolean” datatype columns.
    I would like to display the Booleans as a checkbox without making the column “editable”.

    All of the examples use the “editable:true” for the column.

    I would dig further but the forum search mechanism does not focus as well as I am used to.

    checkbox in Grid #96989

    Stanislav
    Participant

    Hello dishmann,

    The easiest way of doing this is to just set the column to editable: false, this way you can keep the editing on other columns and disabled it in one.
    You can set this property for every column individual, so it doesn’t matter how much checkbox column you have, and don’t want to be edited.

    Best Regards,
    Stanislav

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

    checkbox in Grid #97103

    dishmann
    Participant

    When I set editable: false the value rendered is “true” or “false” no checkbox.

    I want a checkbox. when editable=false.

    Perhaps you have an example.

    checkbox in Grid #97121

    Stanislav
    Participant

    Hello dishmann,

    Can you please clarify a little bit more, I didn’t quite understand what exactly do you want to achieve with this?

    Best Regards,
    Stanislav

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

    checkbox in Grid #97135

    dishmann
    Participant

    Hey Stanislav

    It is hard to explain in writing. Your response however, led me to make a copy of and edit one of the demo files so we have a basis for future discussion.
    Then I noticed something….

    I believe the problem is occurring because I did NOT expressly supply the “data type” in the source for the dataadapter. (Namely the datafields property.)

    While the grid will render without a datatype description, (very cool), the grid probably does not know the underlying data type to make the decision on how to render the cell so by default it outputs text. Only when I set the grid column to “editable” (the columntype is set to: “checkbox”) does the grid know to render a check box. But when the column is set to editable:false it uses the data type defined in the datafields property to render the cell.

    I am going to adjust my code where the check box is not rendering to validate this deductive reasoning….
    In my app I only want to use this one Checkbox to show data while other cells in the row are editable.

    I’ll let you know….
    Thanks
    🙂

    checkbox in Grid #97150

    dishmann
    Participant

    Well I made the code exactly as specified and still the Grid will not accurately render a checkbox unless the column for the checkbox has editable set to true.

    Sadly being that what I am asking for cannot be understood. It is pointless to continue.

    The difference in my code versus the “example/demo” code is I am using an array as the source to the dataadapter.

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

You must be logged in to reply to this topic.