No toolbar at all.

QuestionsNo toolbar at all.
Hubert asked 12 years ago

There are option "top" "button" "both"

but how can I enable option "no" 🙂

sometimes specially in subgrid it would be good to disable toolbar in subgrid

2 Answers
Abu Ghufran answered 12 years ago

Do following config to show/remove items in toolbar

$opt["rowList"] = array();
$opt["pgbuttons"] = false;
$opt["pgtext"] = null;
$opt["viewrecords"] = false;
$g->set_options($opt);

$g->set_actions(array(
"add"=>false, // allow/disallow add
"edit"=>false, // allow/disallow edit
"delete"=>false, // allow/disallow delete
"view"=>false, // allow/disallow view
"refresh" => false, // show/hide refresh button
"search" => false, // show single/multi field search condition (e.g. simple or advance)
)
);

I'm also emailing you latest build to reflect exact changes.

Hubert answered 12 years ago

I've made it like this and this doesn't work (i've update jgrid file to the newest):

$g = new jqgrid();
$g->set_actions(array(
"add" => false, // allow/disallow add
"inlineadd" => false, // will allow adding new row, without dialog box
"edit" => false, // allow/disallow edit
"delete" => false, // allow/disallow delete
"view" => false,
"rowactions" => false, // show/hide row wise edit/del/save option
"autofilter" => false,
"refresh" => false,
"search" => false,
"showhidecolumns" => false
)
);

(…)
$g->set_columns($cols);

$grid["height"] = "100%";
$grid["sortname"] = 'czas';
$grid["sortorder"] = "desc";
$opt["rowList"] = array();
$opt["pgbuttons"] = false;
$opt["pgtext"] = null;
$opt["viewrecords"] = false;
$grid["autowidth"] = true;
$g->set_options($grid);

$out = $g->render("sub1".$_REQUEST["subgrid"]);

echo $out;

Your Answer

1 + 13 =

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?