| Page 1 of 1 | [ 6 posts ] |
|
with nested Headers this dialogue doesnt work for show & hide. Is there any solution for this?
I just found via google hints that it wont work, but perhaps theres something actually changed? many thanks Kai |
|
The last paragraph in: http://developer.yahoo.com/yui/datatable/#nest says:
"Please note that not all feature are compatible with nested Columns. Specifically, Columns that have children can not be resized, and Columns that are children can neither be hidden/shown nor dragged-and-dropped." |
|
Hey Satyam,
thanks for your reply and further thanks for all your work. I read many articles of you about yui and you helped me a lot getting started. For everyone, who is interested in my solution for showing / hiding: In some scenarios it makes sense to display only the parent columns in the show/hide dialogue (group hide/show). You can simply find them by using: Code: parentNodes = this.getColumnSet().tree; parentNodes = parentNodes[0]; To show/hide such a complete column-group, just get now recursivly all their column childnodes of the table header and put their key-name in an array. To change visibility then use: Code: : YAHOO.util.Dom.get('yui-dt0-th-' + cols[i]).style.display = visibility; : Now we just have to hide all nodes of the table body. Loop over your array and get all elements with classname "yui-dt0-col-" + col-key: Code: : elements = document.getElementsByClassName('yui-dt0-col-' + ncols[i]), len = elements.length; for (var a=0; a<len.length; a++){ elements[a].style.display = visibility; } : Visibility should be 'none' or '' for hide / show. I dont think that this is the bettest solution, but a certain way... So any comments are welcome for discussion Regards Kai |
|
Hi Kai,
Sorry, I know this post/thread is dated last year but this is the most related topic about hiding/showing nested columns as YUI 2.8.1 still does not support hiding/showing nested columns I read about your posting at http://yuilibrary.com/projects/yui2/ticket/2528863 and wonder how you add an adapter class for datatable. Any example would be great Thanks. Kindest regards, Choon |
|
Hi Kai,
It is fine now. I have figured out how to do the nested hiding/showing not using your method. In fact, yui2.8.0r4 has partial support for nested hiding/showing just not fully. I tested 1 level child with nested headers defined with key/label pairs worked out fine. 2 levels depth only work partially... can't hide all columns under parent column. Thanks. Kindest regards, Choon |
|
just to complete this topic:
--> http://yuilibrary.com/projects/yui2/ticket/2529483 I fixed that problem. |
| Page 1 of 1 | [ 6 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group