TreeView - want node selection WITHOUT POSTBACK

TreeView - want node selection WITHOUT POSTBACK

am 11.04.2006 16:34:34 von Martin Randall

Can anyone tell me if it is possible to get the TreeView control in ASP.Net
2.0 to allow node selection without triggering a postback?

Thanks!

Martin Randall

RE: TreeView - want node selection WITHOUT POSTBACK

am 12.04.2006 20:38:01 von DHLennon

You could consider using AJAX (or ATLAS in MS-speak) http://atlas.asp.net

"Martin Randall" wrote:

> Can anyone tell me if it is possible to get the TreeView control in ASP.Net
> 2.0 to allow node selection without triggering a postback?
>
> Thanks!
>
> Martin Randall
>
>
>

RE: TreeView - want node selection WITHOUT POSTBACK

am 12.04.2006 20:49:02 von DHLennon

I'm pretty sure that's what they use on this forum!

"DHLennon" wrote:

> You could consider using AJAX (or ATLAS in MS-speak) http://atlas.asp.net
>
> "Martin Randall" wrote:
>
> > Can anyone tell me if it is possible to get the TreeView control in ASP.Net
> > 2.0 to allow node selection without triggering a postback?
> >
> > Thanks!
> >
> > Martin Randall
> >
> >
> >

RE: TreeView - want node selection WITHOUT POSTBACK

am 12.04.2006 22:13:02 von WilliamSullivan

On the treeview:
PopulateNodesFromClient = true
EnableClientScript = true

On each node you add to the treeview:
PopulateOnDemand = true

Make sure to only do this on nodes that have children (save your bandwidth).
The only other thing you have to do is add an event handler to the
TreeView's TreeNodePopulate event. The event args include the node that
needs its children populated. Just stick new child nodes in it and that's
that! Its nice, but there are some bugs that need to get worked out of it...

"Martin Randall" wrote:

> Can anyone tell me if it is possible to get the TreeView control in ASP.Net
> 2.0 to allow node selection without triggering a postback?
>
> Thanks!
>
> Martin Randall
>
>
>

Re: TreeView - want node selection WITHOUT POSTBACK

am 13.04.2006 10:03:49 von Martin Randall

Okay... nice answer, but not to the question I asked, but nice answer
anyway...


"William Sullivan" wrote in
message news:860D1B21-CE64-46AF-A4CB-DCA7D0B03689@microsoft.com...
> On the treeview:
> PopulateNodesFromClient = true
> EnableClientScript = true
>
> On each node you add to the treeview:
> PopulateOnDemand = true
>
> Make sure to only do this on nodes that have children (save your
> bandwidth).
> The only other thing you have to do is add an event handler to the
> TreeView's TreeNodePopulate event. The event args include the node that
> needs its children populated. Just stick new child nodes in it and that's
> that! Its nice, but there are some bugs that need to get worked out of
> it...
>
> "Martin Randall" wrote:
>
>> Can anyone tell me if it is possible to get the TreeView control in
>> ASP.Net
>> 2.0 to allow node selection without triggering a postback?
>>
>> Thanks!
>>
>> Martin Randall
>>
>>
>>

Re: TreeView - want node selection WITHOUT POSTBACK

am 13.04.2006 10:05:34 von Martin Randall

Tsk... anyway of doing it *without* using AJAX? And if I did use AJAX, I
would still need to trap the clientside event without causing a postback
which is the whole point of this post in the first place.

"DHLennon" wrote in message
news:8B93063B-9011-418F-9EBB-2D363D41DA62@microsoft.com...
> You could consider using AJAX (or ATLAS in MS-speak) http://atlas.asp.net
>
> "Martin Randall" wrote:
>
>> Can anyone tell me if it is possible to get the TreeView control in
>> ASP.Net
>> 2.0 to allow node selection without triggering a postback?
>>
>> Thanks!
>>
>> Martin Randall
>>
>>
>>

Re: TreeView - want node selection WITHOUT POSTBACK

am 13.04.2006 14:44:20 von jhcorey

You may want to look at the treeviews from obout.com (free) or
componentart. One nice thing with each of these is that they
dynamically fill branches without either a visible postback or ajax, by
calling a separate aspx page to fill the branch. Very intriguing when
you see it.

On the other hand, these treeviews have their own idosyncrasies, and
you may end up using one for a while and then finding a limitation
that's a show stopper.

Re: TreeView - want node selection WITHOUT POSTBACK

am 24.04.2006 23:17:05 von walla2sl

I think what he's asking is how to remove the call to:

javascript:__doPostBack

from the TreeView node expand or collapse image.

I'm having the same problem. Is there any way to get rid of that
javascript function call?

Here's an example of what is added when I view the source:
href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$tvN avigate','tFY2008')"> src="/FMFIMET/WebResource.axd?d=T97pv8xbNNluDolWp8ffnd8xHGrs 20GjDDdugfkoz5QUFUuDBCccU4RYFtFa3B9p0&t=6327449049715365 55"
alt="Collapse FY2008" style="border-width:0;" />

Re: TreeView - want node selection WITHOUT POSTBACK

am 01.05.2006 16:13:02 von AaronZalewski

Well, I have the same question. I use the TreeView for a handy container for
related information. I just want it to expand/contract clientside. But I DO
NOT want it to "javascript:__doPostBack" on node select. There's no
AutoPostBack = false as far as I can see or way to override this click event.

So, how iz it done?


"walla2sl@gmail.com" wrote:

> I think what he's asking is how to remove the call to:
>
> javascript:__doPostBack
>
> from the TreeView node expand or collapse image.
>
> I'm having the same problem. Is there any way to get rid of that
> javascript function call?
>
> Here's an example of what is added when I view the source:
> > href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$tvN avigate','tFY2008')"> > src="/FMFIMET/WebResource.axd?d=T97pv8xbNNluDolWp8ffnd8xHGrs 20GjDDdugfkoz5QUFUuDBCccU4RYFtFa3B9p0&t=632744904971536555"
> alt="Collapse FY2008" style="border-width:0;" />
>
>

Re: TreeView - want node selection WITHOUT POSTBACK

am 01.05.2006 17:25:01 von AaronZalewski

Nevermind, I figured it out. When you assign the Text of the node, just wrap
the text in a and intercept the click so it doesn't bubble to the
which is where the postback is picked up.

Ex:
node.Text = ""+NodeLabel+"";

"Aaron Zalewski" wrote:

> Well, I have the same question. I use the TreeView for a handy container for
> related information. I just want it to expand/contract clientside. But I DO
> NOT want it to "javascript:__doPostBack" on node select. There's no
> AutoPostBack = false as far as I can see or way to override this click event.
>
> So, how iz it done?
>
>
> "walla2sl@gmail.com" wrote:
>
> > I think what he's asking is how to remove the call to:
> >
> > javascript:__doPostBack
> >
> > from the TreeView node expand or collapse image.
> >
> > I'm having the same problem. Is there any way to get rid of that
> > javascript function call?
> >
> > Here's an example of what is added when I view the source:
> > > > href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$tvN avigate','tFY2008')"> > > src="/FMFIMET/WebResource.axd?d=T97pv8xbNNluDolWp8ffnd8xHGrs 20GjDDdugfkoz5QUFUuDBCccU4RYFtFa3B9p0&t=632744904971536555"
> > alt="Collapse FY2008" style="border-width:0;" />

> >
> >