Show/Hide columns based on check-box instead a click or ctrl-click

QuestionsShow/Hide columns based on check-box instead a click or ctrl-click
Massimo Gagliardi asked 4 years ago

Hi Abu
There is a way to showing or hiding the columns using a check-box on the show/hide dialog instead of the click or double-click?
Because, for the many users, when the columns are many hide or show more of one is easier with a click on a check-box put before the column name than using a ctrl-click!.
Thanks in advance
Massimo Gagliardi

15 Answers
Abu Ghufran answered 4 years ago

Hi,

I have just added solution for your issue.
Emailing you updated lib and demo.

Abu Ghufran answered 4 years ago
Massimo Gagliardi answered 4 years ago

It's exactly what I wanted.
Thank you very much.

Abu Ghufran answered 4 years ago

Emailed you latest build.

For others, email your order number & payment email address to get latest build at [email protected].

Ananda Theerthan answered 4 years ago

Hi Abu,
Can you please email me this solution.

Massimo Gagliardi answered 4 years ago

Problem:
Before the selected columns were not printed either in Excel or in PDF.
yes now, and that's not good

Massimo Gagliardi answered 4 years ago

Errata corrige:
I intend the colums not select, of course

Abu Ghufran answered 4 years ago

I dont understand your query.
Here is working demo: http://www.phpgrid.org/demo/demos/export/export-selected.php

To try, Click of column selection button, customize and then export.

If you mean something else, please share screenshot with more explanation.

Massimo Gagliardi answered 4 years ago

Before the change, in the dialog box "Show/hide columns", from click/ctrl-click to check-box, once I selected the columns to show whether I exported grid in PDF or XLS I obtained only the selected columns.
After using check-box it is no longer true; the phpgrid exports all columns.
Regards

Abu Ghufran answered 4 years ago

Did you checked working demo?
Can you generate this issue in live demo?

You can review the code of http://www.phpgrid.org/demo/demos/export/export-selected.phps and match with your grid code.

Massimo Gagliardi answered 4 years ago

I checked the live demo: I cannot generate the issue;
then I downloaded your code, put this in your environment (phpdrid/demos) and executed: works!
Then I copied the code in my environment, as how is, with your db and I ran this: doesn't work.
At the last I copied your phpgrid_dist.php in my environemnt: was that.
I had an older version !!!
Thank you very much

Massimo Gagliardi answered 4 years ago

But where i use:
$e["on_export"] = array("custom_export", null, true);
and
$grid["export"]["render_type"]="html";
(pratically in all my codes)
I get a file excel without customizations and a empty pdf file.
Suggestions?
Thank in advance.

Abu Ghufran answered 4 years ago

Please refer demos/export/export-pdf-html.php code and working demo.
Let me know if it does not work as expected.

Massimo Gagliardi answered 4 years ago

It's possible that my malfunction depends by different codes with same column names.
I solved modifying the cookie name in the phpgrid_dist from:
– jqgrid_colchooser_{$grid_id}
to:
– jqgrid_colchooser_".basename($_SERVER["SCRIPT_NAME"],".php")."_{$grid_id}

I think this is a valid suggestion.
Thanks in advance.

Abu Ghufran answered 4 years ago

Thanks for the suggestion.
We'll review this change and update the lib.

Your Answer

20 + 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?