Column to show in "View selected row" only

QuestionsColumn to show in "View selected row" only
Rob asked 12 months ago

I want the initial view of the grid to hide a long text field but to show it when the row is selected and the “View selected row” button is clicked

Here’s my code

$col = array();
$col[“title”] = “Description”;
$col[“name”] = “Description”;
$col[“width”] = “20”;
$col[“editable”] = false;
$col[“export”] = false;
$col[“hidden”] = false; // hide column by default
$col[“show”][“view”] = true;
$cols[] = $col;

Server times out but if I remove $col[“show”][“view”] = true; the response time is back to almost instant.

Apart from that both versions of the code are identical.

Have I omitted or misunderstood something?

I’m on @version 2.2 build 20170726-1224

2 Answers
rob answered 12 months ago

Progress: there was an extra $cols[] = $col; further down the code (in both versions)

removing that restored responsiveness but I still don’t get the desired effect
i.e. $col[“hidden”] = false;  only hides the column in grid-view if $col[“show”][“view”] = true; is deleted

Abu answered 12 months ago

To hide in listing and show in view dialog, you need to set:
$col[“show”][“list”] = false;
$col[“show”][“view”] = true;

Also remove hidden property as it is internally managed.

Your Answer

5 + 10 =

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?