Opened 7 years ago

Closed 6 years ago

#15720 closed defect (patchwelcome)

LazyTreeGrid - setting grid column as hidden by default makes setColumnVisibility method ignored in later calls

Reported by: agmonser Owned by: Evan
Priority: undecided Milestone: tbd
Component: DojoX Grid Version: 1.7.3
Keywords: Cc:
Blocked By: Blocking:


Hi Team,

I have found an issue for LazyTreeGrid? (but maybe this issue exists for other Grids as well) regarding default visibility of its columns.

I set few columns as hidden by default in layout definition, e.g.:

var layout = [{

name : 'Title', field : 'label', width : '50%'

}, {

name : 'Author', field : 'author', width : '30%'

}, {

name : 'Pages', field : 'pages', width : '10%', hidden : 'true'

}, {

name : 'Genre', field : 'genre', width : '10%', hidden : 'true'


But, when I tried to show them programmatically on user behalf by calling setColumnVisibility(column, visibility) function, this call has been simply ignored. (At this point, I have to mention that without setting hidden property showing/hiding columns had worked pretty well.)

Than I tried to comment this hidden property and I've put something like this:

tree.layout.setColumnVisibility(2, false);

tree.layout.setColumnVisibility(3, false);

into overridden prerender method, but behavior remained the same. Then I've tried to override postrender and render in the same manner, but without success - behavior remained the same (just as by putting hidden property to true in layout object literal).

In the end, I gave up of using either 'hidden' property or overriding methods and simply added the next few lines in my code, right after tree.startup();

tree.layout.setColumnVisibility(2, false);

tree.layout.setColumnVisibility(3, false);

and that's been my ugly workaround for now.

However, this issue still exists, and it would be great if someone could take care of it.

Regards, Alex

Change History (2)

comment:1 Changed 6 years ago by bill

DojoX Grid and EnhancedGrid are deprecated in favor of dgrid and gridx.

You should upgrade your code to use one of those two grids.

We will consider patches to the old DojoX Grid code though.

comment:2 Changed 6 years ago by bill

Resolution: patchwelcome
Status: newclosed
Note: See TracTickets for help on using tickets.