Cannot freeze columns

QuestionsCannot freeze columns
Jim Poon asked 5 years ago

Hi,

 

I am using the full licensed version 2.6.3.

Using grid4php under laravel 5.5 environment.

The column frozen option does not work.

Code attached here:

(In laravel controller side)

$g = new \jqgrid($db_conf);
$g->con->debug = 0; // changed from 0 to 1
$opt[“caption”] = “Values”;
$opt[“autowidth”] = true;
$opt[“autoresize”] = false;
$opt[“shrinkToFit”] = false; // dont shrink to fit on screen
$opt[“width”] = “800”;
// to remove vertical scroll bar
$opt[“height”] = “auto”;
$opt[“pgbuttons”] = true;
// $opt[“pgtext”] = null;
$opt[“viewrecords”] = true;
$opt[“rowNum”] = 10;
$opt[“hiddengrid”] = false;
$opt[“toolbar”] = “top”;
$opt[“tooltip”] = true;
$opt[“cellEdit”] = false;
$opt[“forceFit”] = false;
$opt[“altRows”] = true;
// you can also set ‘All’ for all records
$opt[“rowList”] = array(10,20,30,’All’);
$opt[“multiselect”] = true;
$opt[“sortable”] = true; // it is required for freezed column feature

$g->set_actions(array(
“add”=>false, // allow/disallow add
“edit”=>false, // allow/disallow edit
“delete”=>false, // allow/disallow delete
“view”=>true, // allow/disallow view
“refresh” => true, // show/hide refresh button
“search” => false, // show single/multi field search condition (e.g. simple or advance)
“autofilter” => true, // Enable / Disable autofilter toolbar for search on top. Defaults to true
“export_excel”=>true,
“rowactions”=>false, // show/hide row wise edit/del/save option
)
);
$g->set_options($opt);
$g->table = $tablename;
$g->set_columns($cols);

$ValuesGridOut = $g->render(“ValuesList”);

return view(‘scoretable’,array(‘ValuesGridOut’=>$ValuesGridOut);

 

3 Answers
Jim Poon answered 5 years ago

forgot to attach my column definitions:

$values_col_width=”80″;
$col = array();
$col[“title”] = “Survey ID”;
$col[“name”] = “seq”;
$col[“hidden”] = false;
$col[“frozen”] = true;
$col[“width”] = “50”;
$col[“align”] = “center”;
$col[“sortable”] = false; // this column is not sortable
$cols[] = $col;

$col[“title”] = “Company Name”;
$col[“name”] = “f001”;
$col[“hidden”] = false;
$col[“frozen”] = true;
$col[“width”] = “140”;
$col[“sortable”] = false; // this column is not sortable
$cols[] = $col;

 

Jim Poon answered 5 years ago

fixed by adding:

$opt[‘scroll’] = false;

 

Abu Ghufran Staff answered 5 years ago

Thanks for the update.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

16 + 20 =

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?