Boolean Field (for yes/no, true/false values)

QuestionsBoolean Field (for yes/no, true/false values)
Martin Gossmann asked 10 years ago

I have not found any reference to such a boolean field in the description. Background: the data has several columns with 0/1-yes/no-true/false values. Ideally the positive values should be represented in the grid with a symbol like a bullet or a checked box or a cross and the negative values should stay empty.

As an example you can check this image:

Does something like that exists?

1 Answers
Abu Ghufran answered 10 years ago

You can refer demos/misc/example-all.php

Following code config is required for our case.

$col = array();
$col["title"] = "Closed";
$col["name"] = "closed";
$col["width"] = "50";
$col["editable"] = true;
$col["edittype"] = "checkbox"; // render as checkbox
$col["editoptions"] = array("value"=>"1:0"); // with these values "checked_value:unchecked_value"
$col["formatter"] = "checkbox";
$cols[] = $col;

Your Answer

11 + 19 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?