Conditional Formatting stuck on Loading..

QuestionsConditional Formatting stuck on Loading..
Rob asked 11 years ago

Here is my code, not sure why it's not working. Also, I've posted the only error showing up in firebug. My data is coming from an array.

Error: Container is not defined
http://www.google.com/uds/api/visualization/1.0/ce05bcf99b897caacb56a7105ca4b6ed/format+en,default+en,ui+en,corechart+en.I.js
Line 129

$g1 = new jqgrid();

// disable all dialogs except edit
$g1->navgrid["param"]["edit"] = false;
$g1->navgrid["param"]["add"] = false;
$g1->navgrid["param"]["del"] = false;
$g1->navgrid["param"]["search"] = false;
$g1->navgrid["param"]["refresh"] = false;

$g1->set_actions(array(
"add"=>false, // allow/disallow add
"edit"=>false, // allow/disallow edit
"delete"=>false, // allow/disallow delete
"rowactions"=>false, // show/hide row wise edit/del/save option
"export"=>true, // show/hide export to excel option
"autofilter" => true, // show/hide autofilter for search
"search" => "advance" // show single/multi field search condition (e.g. simple or advance)
)
);

// set database table for CRUD operations
$g1->table = $datab;

$col1 = array();
$col1["title"] = "LSPK ID"; // caption of column
$col1["name"] = "lspkid"; // grid column name, must be exactly same as returned column-name from sql (tablefield or field-alias)
$col1["width"] = "5";
$col1["editable"] = false;
$col1["hidden"] = false;
$cols1[] = $col1;

$col1 = array();
$col1["title"] = $today; // caption of column
$col1["name"] = "d0"; // grid column name, must be exactly same as returned column-name from sql (tablefield or field-alias)
$col1["width"] = "5";
$col1["editable"] = false;
$col1["align"] = "center";
$cols1[] = $col1;

$loop = 1;
while ($loop < "15") {
$col1 = array();
$col1["title"] = $dayofweek[$loop]; // caption of column
$col1["name"] = "d".$loop; // grid column name, must be exactly same as returned column-name from sql (tablefield or field-alias)
$col1["width"] = "5";
$col1["editable"] = false;
$col1["align"] = "center";
$cols1[] = $col1;
$loop++;
}

// set few params
$grid1["sortname"] = 'lspkid'; // by default sort grid by this field
$grid1["sortorder"] = "asc"; // ASC or DESC
$grid1["caption"] = "Production Schedule";
$grid1["subGrid"] = false;
$grid1["autowidth"] = true;
$grid1["export"] = array("format"=>"pdf", "filename"=>"my-file", "heading"=>"Invoice Details", "orientation"=>"portrait", "paper"=>"a4");
$grid1["reloadedit"] = true;
$g1->set_options($grid1);

$f1 = array();
$f1["column"] = "d0";
$f1["op"] = "eq";
$f1["value"] = "0";
// $f["cellcss"] = "'background-color':'red'"; // this also work
$f1["cellcss"] = "'background-color':'#000000'";
$f1_conditions[] = $f1;

$g1->set_conditional_css($f1_conditions);
$g1->set_columns($cols1);

// render grid
$out1 = $g1->render("list2");

4 Answers
Rob answered 11 years ago

The data displays perfectly, but soon as I enter the conditionals "Loading" pops up and the conditions do not take effect.

Rob answered 11 years ago

After further testing it seems to only have the issue when $f1["column"] has a number in it.. if i change it to "lspkid" it works fine.

Abu Ghufran answered 11 years ago

Can you check the firebug console for JS error?
Please send me screenshots and if the grid is online, share the link.
You can email me details at [email protected]

Abu Ghufran answered 11 years ago

Hello,

The by JS error, it looks like the issue is with google visualization setting which is causing error.
And once error is raised, JS runtime sometime blocks further execution, causing formatting issue.

To check it, try commenting the 'http://www.google.com/uds/api/visualization&#039; url call.

Your Answer

0 + 6 =

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?