jQWidgets Forums
jQuery UI Widgets › Forums › Grid › checkbox in Grid
This topic contains 5 replies, has 2 voices, and was last updated by dishmann 7 years, 6 months ago.
-
Authorcheckbox in Grid Posts
-
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.
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,
StanislavjQWidgets Team
http://www.jqwidgets.com/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.
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,
StanislavjQWidgets Team
http://www.jqwidgets.com/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
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.
-
AuthorPosts
You must be logged in to reply to this topic.