cannot get subgridparams value

Questionscannot get subgridparams value
caloyiv asked 10 years ago

how do i solve this problem?
i have ["subgridparams"] = "invoice_id, customer_id";

how do i use customer id to work on this in my subgrid

$col = array();
$col["title"] = "Product";
$col["name"] = "product_c";
$col["dbname"] = "products.product_code"; // this is required as we need to search in name field, not id
$col["width"] = "30";
$col["align"] = "left";
$col["search"] = true;
$col["editable"] = true;
$col["editrules"] = array("required"=>true);
$col["formatter"] = "autocomplete"; // autocomplete
$col["formatoptions"] = array( "sql"=>"select distinct product_code as k, product_code as v from salesman_price WHERE customer_id = '$customer_id'",
"search_on"=>"product_code",
"update_field" =>"product_c"
);

$col["editoptions"] = array(

"onchange" => array(
"sql"=>"select product_code, product_description, quantity, weight, price from salesman_price WHERE customer_id = '$customer_id'",
"search_on"=>"product_code",
"callback" => "fill_form_add_sales" )
);
$cols[] = $col;

1 Answers
Abu Ghufran answered 10 years ago

Remove space b/w field names … change

["subgridparams"] = "invoice_id, customer_id";

to

["subgridparams"] = "invoice_id,customer_id";

Your Answer

2 + 3 =

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?