473,804 Members | 2,225 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filter Treeview using XmlDatasource.x path

Hi,
I have this xmldoc linked to a xmldatasource in .Net 2.0

<MENUROOT title="Home" visible="true">
<MENU title="subnode_ 1" visible="true">
<MENUITEM title="leafnode _1" visible="true" />
<MENUITEM title="leafnode _2" visible="false" />
</MENU>
<MENU title="subnode_ 2" visible="false" >
<MENUITEM title="leafnode _3" visible="true" />
<MENUITEM title="leafnode _4" visible="true" />
</MENU>
</MENUROOT>

The xmlDatasource is linked to a treeview control in an asp.net page.
I need to filter the xmldatasource only to show the items tha have the
attribute set to true.

If subnode_2 is set to false then then the leafnode_3 and 4 must not be
shown even if these nodes are set to true.

Anyone have any ideas about this.

Thanks alot!

/espen
Apr 10 '06 #1
0 2335

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2297
by: trond | last post by:
Hello all, I am building a personal web site in VS2005 as a kind of learing project for myself, so forgive me if this is a novice question. I am planning to use an XML file called SiteSettings.xml to hold site-wide info such as copyright info, site title (e.g. my homepage) etc. Currently this xml file looks like this: <?xml version="1.0"?> <SiteSettings>
2
3349
by: Ryo | last post by:
Hello ! I have an XmlDocument in memory and I want to put this document as datasource of my treeview. How to do this ? Thanks.
0
1240
by: Ryo | last post by:
Hello ! I have this simple aspx page: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="test_treeview.aspx.cs" Inherits="test_treeview" Title="Treeview" %> <asp:Content ID="cntCorpCentre" ContentPlaceHolderID="cphCorpCentre" EnableViewState="false" RunAt="Server"> <asp:TreeView ID="Organigramme" SkinID="Organigramme" EnableViewState="false" RunAt="server" />
3
9171
by: Brian | last post by:
Using external XML, I'm trying to build a quiz, but I can't seem to specify the DataSource for the RadioButtonList within a Repeater ItemTemplate. I've tried a number of approaches, but I haven't really had any success. I'm pretty sure I should be casting my XPathSelect() call to something so I can get at its attributes. This seems like it should be easy, and maybe I'm missing something obvious. Does anyone have any ideas? Here is the...
0
1251
by: Jan Limpens | last post by:
Hello, I am populating a tree with a XmlDataSource, and although I am explicitly databinding it to the source upon every change in the xml's structure, it will show the changes only after I rebuild the website. The XmlDatasource receives the updated xml (shows in Debugger). some code: <asp:XmlDataSource ID="XmlDataSourceDocuments" runat="server" XPath="/site/*"></asp:XmlDataSource>
1
3176
by: Disccooker | last post by:
i am trying to use XPath and the XMLDataSource to display data from an XMLDocument and am getting nowhere. What i would like to do is have a repeater display a label for Seed, label for Team Name and a Text Box for each game - like an NCAA bracket. 1. Team1 16. Bradley 8. Missouri 9. USM
3
4076
by: =?Utf-8?B?TGVzbGll?= | last post by:
Using Visual Studio 2005 SP1 I am attempting to dynamically load a treeview control. I create an XmlDataSource and then load the data source using XmlDataSource.Data. I Load my XML string into this property using the code shown below. However if I change the values in the XML string that I am loading into XmlDataSource.Data and then run the web, the changes do not show up. The only way to get the changes to show up is to rebuild the...
2
1846
by: rote | last post by:
I have a code below i'm trying to test It had a DataSetDatasource but i thinks its deprecated if yes what can i use in this scenario below? I used XmlDatasource but its saying it can't find the property url in the xml which is there Any ideas? ** XML datasource file below
2
2242
by: Polaris | last post by:
Hi Experts: I'm using ASP.NET 2.0. I'm using a TreeView control with a design-time configured XmlDataSource (an XML file). I use the TreeView control as a "message board" with each node representing a message. I noticed that the TreeView loads alright from the XML file but did not save anything. I call the TreeView.Save() for each new node added into the TreeView. What I'm missing here? Thanks in advance!
0
9595
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,...
0
10603
Oralloy
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...
0
10353
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10356
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9176
agi2029
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...
1
7643
isladogs
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...
0
6869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3836
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3003
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.