I am using a Webdatatree and I have two javascript functions I need to Initialize in the clientEvents. It looks like you can only have one function called by this event. I tried adding both but only one fires. Below are my functions. One for maintaining scroll position and the other for hiding checkboxes. I was going to try to combine the two but not having any luck yet. Is there a way to initialize both?
childCount = node.get_childrenCount();
ParentN = node.get_parentNode();
) {
checkbox = node._get_checkBox();
checkboxEl = node._get_checkBox().get_element();
(!checkboxEl && node._get_expandCollapseElement()) {
checkboxEl = node._get_expandCollapseElement().nextSibling;
}
(checkboxEl) {
checkboxEl.style.display =
;
x = 0; x < childCount; ++x) {
child = node.get_childNode(x);
HideCheckbox(child);
root = tree.getNode(0);
HideCheckbox(root);
root = root.get_nextNode();
//subscribe to onscroll event
sender._element.onscroll = onScrollhandler;
)
sender._element.scrollTop = $get(
).value;
$get(
).value =
$find(
)._element.scrollTop;
>
Hi jcom39201,
Thank you for your reply.
Glad that your issue has been resolved. As far as the checkboxes flashing for a second, I was able to replicate that in IE but not in Mozilla, therefore the matter may be browser specific.
Please do not hesitate to contact me if I can be of further assistance.
Best Regards,
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://es.infragistics.com/support
Petar,
Thanks for your reply! I got it working. I do want the root node checkboxes to show, just not any child node boxes. When i select an item in the list that is down further in the list (when the first node is not visible) the child node checkboxes do appear for a second and then disappear as it runs through the code. Not sure if there is a fix for that but I can live with that at this point. Again, as always, thank you for your help!
I have tested your code and it seems to be working beautifully with the exception of root nodes' checkboxes not being hidden upon initialization. After adding the following line:
node._get_checkBoxElement().style.display = "none";
node._get_checkBoxElement().style.display =
"none";
at the beginning of the HideCheckbox() function and calling the maintainScrollbarPosition(tree, args) function at the end of the init function, both of your requirements seem to be functioning as desired.Also this line
if ($get('<%=HiddenField1.ClientID %>').value !== "" )
should maybe be != .
I am attaching my test sample which uses your code nad version 9.2
Please let me know if this helps.