Fields hidden & show/hide columns

QuestionsFields hidden & show/hide columns
Massimo Gagliardi asked 7 years ago

Hi Abu
I have another problem.
In the show/hide columns the fields that are set to hidden are shown without check but if you export the grid the fields are exported.
To haven't these fields in the export you must open the show/hide columns and click on the ok button.
I ask: isn't possible that the fields hidden aren't exported and if you want you can check these in the show/hide columns?
Massimo Gagliardi

7 Answers
Abu Ghufran answered 7 years ago

To stop fields from export, you need to set:
$col["export"] = false;

Massimo answered 7 years ago

I didn't explain well.
Normally the hidden fields ($grid["hidden"]=true) are unchecked in the "show/hidden dialog" and aren't exported.
But if you don't enter in the "show/hidden dialog" and click on the ok button these fields are, instead, exported.
It's possible to change this behaviour?
Thanks in advance

Abu Ghufran answered 7 years ago

Yes, to initially stop these fields from export (before dialog selection) you need to set:
$col["export"] = false;

Massimo answered 7 years ago

Excuse me Abu.
One more time I didn't explain properly.
In the "show/hidden dialog" the hidden fields ($grid["hidden"]=true) are unchecked but are exported anyway. For not exporting these columns you need to open the "show/hidden dialog" and click on the ok button.
If you set $col["export"] = false; you will never export.
Vice versa, for exporting the hidden columns, if necessary, I would like to open the "show/hidden dialog", check these columns and click on the ok button.
In the screenshoot sequence below you can view:
1. a code fragment of the fields hidden declaration
2. the grid
3. the show-hidden dialog
4. the PDF export
5. the show-hidden dialog in witch I clicked ok button
6. the final PDF export

I would like to obtain this final export without enter in the show-hide dialog

https://www.dropbox.com/s/azkvtx5wcayq6jw/1.code_fragment_with_hidden_fields.png?dl=0

https://www.dropbox.com/s/yz65970we28vjcp/2.grid_with_hidden_fields_%28hidden_of_course%29.png?dl=0

https://www.dropbox.com/s/wbnnzkbcgy1e5do/3.show-hidden_dialog.png?dl=0

https://www.dropbox.com/s/ybw2o1jlm211faa/4.export_%28with_hidden_fields%29.png?dl=0

https://www.dropbox.com/s/pok2cvoyr8rchr6/5.show-hidden_dialog_with_click_on_ok.png?dl=0

https://www.dropbox.com/s/r01c4ws5f0u1v4r/6.export_%28without_hidden_fields%29.png?dl=0

It's possible?
Thanks in advance

Abu Ghufran answered 7 years ago

Not yet.
i'll be updating you.

Massimo answered 7 years ago

Some news?
Thanks in advance

Abu Ghufran answered 7 years ago

Are you using state persistence feature?
I am unable to generate this issue here. Can you email me code + test db of this grid for review?

Your Answer

0 + 12 =

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?