By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,136 Members | 1,089 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,136 IT Pros & Developers. It's quick & easy.

treeview expand client-side attribute

P: n/a
i have a treeview
(id="trv")

i would like to do something like this:
trv.Attributes.Add("onexpand", "javascript:alert(this);");
i cannot make this work
i would like to know if this is the way I should do it, or should i
add some event somehow to each node
basically i would like to do some javascript action on each expand -
each (expanded) node
(later on collapse too)
i found this example in articles like this one:
http://p2p.wrox.com/topic.asp?TOPIC_ID=46824
basically i have somthing like this:
nodeSection.NavigateUrl = "javascript:showMenu('Section', " +
rowSection["ContractSectionId"].ToString() + ", " +
rowSection.GetChildRows("SectionToGroup").Length.T oString() + ");";
i would like to add an other feature like this, only this time i'd
like to do it on expand / collapse ...
thanks

Apr 20 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I just been trying to fix one of my own issues (styling the treeview). I
found this site, then looking on the list of articles, found this link.

http://www.java2s.com/Code/ASP/Compo...ctionVBnet.htm

Perhaps just what you want. It seems there is an onexpand attribute that you
can already use.

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available

"Swoosh" <Sw****@discussions.microsoft.comwrote in message
news:96**********************************@microsof t.com...
>i have a treeview
(id="trv")

i would like to do something like this:
trv.Attributes.Add("onexpand", "javascript:alert(this);");
i cannot make this work
i would like to know if this is the way I should do it, or should i
add some event somehow to each node
basically i would like to do some javascript action on each expand -
each (expanded) node
(later on collapse too)
i found this example in articles like this one:
http://p2p.wrox.com/topic.asp?TOPIC_ID=46824
basically i have somthing like this:
nodeSection.NavigateUrl = "javascript:showMenu('Section', " +
rowSection["ContractSectionId"].ToString() + ", " +
rowSection.GetChildRows("SectionToGroup").Length.T oString() + ");";
i would like to add an other feature like this, only this time i'd
like to do it on expand / collapse ...
thanks

Apr 20 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.