Enable checkbox by default & lookup table

QuestionsEnable checkbox by default & lookup table
Amod Kamat asked 12 years ago

Support needed for below queries:

1. Enable checkbox by default
2. In field, how to read data from other DB sources (e.g. Category table which has all categories for shop)
3. On selection of some value how to trigger value selection for other field in DB. (Say I selected product from one field. Want to populate product ID in other column)

Regards,
Am

1 Answers
Abu Ghufran answered 12 years ago

#1. You can pre-check checkbox by following code. See the bold item. Valid for data insertion.

$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", "checked"=>"checked"); // with these values "checked_value:unchecked_value"
$col["formatter"] = "checkbox";

#2. Please refer dropdown.php, where client name is shown from clients table, and client_id is used for invoice table.

Regards,

PHP Grid Support

Your Answer

11 + 9 =

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?