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 9 21827
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
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
On the treeview:
PopulateNodesFr omClient = true
EnableClientScr ipt = true
On each node you add to the treeview:
PopulateOnDeman d = 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 TreeNodePopulat e 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
Okay... nice answer, but not to the question I asked, but nice answer
anyway...
"William Sullivan" <Wi************ *@discussions.m icrosoft.com> wrote in
message news:86******** *************** ***********@mic rosoft.com... On the treeview: PopulateNodesFr omClient = true EnableClientScr ipt = true
On each node you add to the treeview: PopulateOnDeman d = 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 TreeNodePopulat e 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
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" <DH******@discu ssions.microsof t.com> wrote in message
news:8B******** *************** ***********@mic rosoft.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
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.
I think what he's asking is how to remove the call to:
javascript:__do PostBack
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:
<a
href="javascrip t:__doPostBack( 'ctl00$ContentP laceHolder1$tvN avigate','tFY20 08')"><img
src="/FMFIMET/WebResource.axd ?d=T97pv8xbNNlu DolWp8ffnd8xHGr s20GjDDdugfkoz5 QUFUuDBCccU4RYF tFa3B9p0&t= 632744904971536 555"
alt="Collapse FY2008" style="border-width:0;" /></a>
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 :__d oPostBack" 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?
"wa******@gmail .com" wrote: I think what he's asking is how to remove the call to:
javascript:__do PostBack
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: <a href="javascrip t:__doPostBack( 'ctl00$ContentP laceHolder1$tvN avigate','tFY20 08')"><img src="/FMFIMET/WebResource.axd ?d=T97pv8xbNNlu DolWp8ffnd8xHGr s20GjDDdugfkoz5 QUFUuDBCccU4RYF tFa3B9p0&t=6327 44904971536555" alt="Collapse FY2008" style="border-width:0;" /></a>
Nevermind, I figured it out. When you assign the Text of the node, just wrap
the text in a <span> and intercept the click so it doesn't bubble to the <A>
which is where the postback is picked up.
Ex:
node.Text = "<span onclick='return false;'>"+NodeL abel+"</span>";
"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:__d oPostBack" 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?
"wa******@gmail .com" wrote:
I think what he's asking is how to remove the call to:
javascript:__do PostBack
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: <a href="javascrip t:__doPostBack( 'ctl00$ContentP laceHolder1$tvN avigate','tFY20 08')"><img src="/FMFIMET/WebResource.axd ?d=T97pv8xbNNlu DolWp8ffnd8xHGr s20GjDDdugfkoz5 QUFUuDBCccU4RYF tFa3B9p0&t=6327 44904971536555" alt="Collapse FY2008" style="border-width:0;" /></a>
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: George M. |
last post by:
I'm working with the treeview control on an ASP.NET page (written in C#), and I have one built the looks something like:
Root
|_Category1
|_Site1
|_Report1
|_Report2
|_Site2
|_Report3
|_Report4
|
by: Andrew Robinson |
last post by:
I am using a TreeView to perform navigation and have a few nodes that need
to generate a popup menu. For this, I use the SelectedNodeChanged event and
then add the relevant "window.open" script to the page using the
ClientScript.RegisterStartupScript method.
This seems to work fine, but if the user clicks on the same node twice, the
event doesn't fire a second time. I assume this is by design as the Node
Selection hasn't changed, but...
|
by: Daves |
last post by:
Sorry folks but I will be reposting this question from 6/5 until someone
gives me an answer - the question is very easy and so ought the answer to
be. I really need the answer!
-------
I'm sorry for reposting but I've already googled for hours and I see others
have asked about this here without getting replies, this is starting to look
like some Bermuda phenomenon nobody wants to answer to! I really need to
accomplish the task below...
|
by: amirmi |
last post by:
Hi,
I Have a Treeview that represent Stock Indicators.
The idea is when i press the indicator i want it to create a
client-side table with all the parameters of this indicator - which are
listed in the XML under "IndicatorParam"
The problem is that i DONT WANT TO USE POSTBACK.
I, of course Changed the "SelectAction" for this node to "none" instead
of "select" to disable the post-back.
but what now? i want to use javascript for building...
|
by: tmldias |
last post by:
Hi all,
I've already "lost" too many time and no success...
I want to remove the default postback when the user presses a node in
the tree. I want to navigate and selecte nodes in the tree just
client-side without postbacks to the server.
Thanks.
| |
by: Matt MacDonald |
last post by:
Hi All,
I have a form that displays hierarchical categories in a treeview. Ok so
far so good. What I was to do is have users be able to select a node in the
treeview as part of filling out the form. I only want to allow single
selection, so using checkboxes is out of the question. It works as is, but
it makes the form very cumbersome if every time that a user selects a node,
the whole page has to reload. Is there a way to have a node...
|
by: JJ |
last post by:
Is there any way you can expand a parent node on the treeview control
_without a postback_ by clicking on the node text (NOT clicking the expand
image URL) ?
I want to format the treeview node to look like a column of buttons that
expand to show the child nodes (if there are child nodes) qithout a
postback. I don't want to display the plus/minus or any other
expand/collapse graphic.
?
|
by: makennedy |
last post by:
Hi Experts,
Please help, I am a newbie to ASP.NET 2.0 may be I am doing something wrong or there may be a bug somewhere.
Basically I have a TreeView Control which I have created programmatically. And I want to bind the selection of a TreeNode (which is a record) from the database) to a DetailsView which shows the datatable record for the selected TreeView node in the Details View.
I am using IDE : Visual Web Developer 2005 Express; OS=...
|
by: =?Utf-8?B?Rmx5Z3V5?= |
last post by:
I have a TreeView with so many nodes that it requires scroll bars. When the
user selects a node the screen is refreshed and the selected node is no
longer visible. The TreeView is opened to the selected node but the screen
is not scrolled to it. How can I get the TreeView to show the selected node
after it has been refreshed?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |