expression web help Homepage
Forum Home Forum Home > Expression Web > ASPX
  New Posts New Posts RSS Feed: How to filter XML Gridview w/ a DropDownList
  FAQ FAQ  Forum Search   Register Register  Login Login


How to filter XML Gridview w/ a DropDownList

 Post Reply Post Reply
Author
Message
kernel View Drop Down
Just starting out
Just starting out
Avatar

Joined: 28 Apr 2008
Online Status: Offline
Posts: 3
Post Options Post Options   Quote kernel Quote  Post ReplyReply Direct Link To This Post Topic: How to filter XML Gridview w/ a DropDownList
    Posted: 28 Apr 2008 at 1:38pm
Hi all.  I love this site and this is my first post.  I am populating a gridview with an XML file.  But there is a lot of information in the GridView that I would like to filter out by using a DropDown List.  The dropdown list can pull the filter field "category" from either XML or .mdb file.  How can this be done? I have no problems doing this with both data sources being .mdb but am finding it more difficult with the data  source being xml.
 
Thank you for the responses.
Back to Top
Sponsored Links
           

Back to Top
jimd View Drop Down
Admin Group
Admin Group


Joined: 16 Oct 2006
Location: United Kingdom
Online Status: Offline
Posts: 4944
Post Options Post Options   Quote jimd Quote  Post ReplyReply Direct Link To This Post Posted: 28 Apr 2008 at 2:42pm
Hi Kernal thank you for your kind words.
Can you give more details please?
One can filter the results of an xml file in the xml itself but i am unclear as to what you would like to do?
Thank you
JIM
Back to Top
kernel View Drop Down
Just starting out
Just starting out
Avatar

Joined: 28 Apr 2008
Online Status: Offline
Posts: 3
Post Options Post Options   Quote kernel Quote  Post ReplyReply Direct Link To This Post Posted: 28 Apr 2008 at 2:48pm
I don't want to force the user to be stuck with a certain filter.  I would like for the user to filter the data as they wish.  I'd like to be able to select a category from the dropdownlist and have the gridview automatically populate all of the data that pertains to that category selection.  I can do this with an Access database without issue, I would like to able to do this with an XML file because I can have a user upload a new XML file without me having to touch it and the pages would build themselves dynamically.
 
Thanks for the reply.
Back to Top
Jiggy View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 06 Feb 2007
Online Status: Offline
Posts: 553
Post Options Post Options   Quote Jiggy Quote  Post ReplyReply Direct Link To This Post Posted: 30 Apr 2008 at 10:59am
Can you submit some sample code?  What you'll need to do is use an xpath query in your filter I'd imagine, but I could get more specific with the gridview and XML file posted.
http://www.medicalcontracting.com
Back to Top
kernel View Drop Down
Just starting out
Just starting out
Avatar

Joined: 28 Apr 2008
Online Status: Offline
Posts: 3
Post Options Post Options   Quote kernel Quote  Post ReplyReply Direct Link To This Post Posted: 01 May 2008 at 6:38am

This is a sample of the XML file I am using: 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<products xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <product>
  <item>6023-1306</item>
  <category>Wire Storage</category>
  <description>18 PAIR DOOR SHOE RACK</description>
  <image>6023-1306.jpg</image>
 </product>
 <product>
  <item>6024-575</item>
  <category>Wire Storage</category>
  <description>DELUXE ADJUSTABLE GARMENT RACK</description>
  <image>6024-575.jpg</image>
 </product>
 <product>
  <item>6062-1457</item>
  <category>Hangers</category>
  <description>S/4 CRYSTAL CUT DRESS/BLOUSE HANGERS</description>
  <image>6062-1457.jpg</image>
 </product>
</products>
 
I'm looking into the XPath now.  I'm new to XML so the help is much appreciated.
Back to Top
oisin_dubh View Drop Down
Learning Fast
Learning Fast
Avatar

Joined: 27 Jan 2007
Location: United Kingdom
Online Status: Offline
Posts: 59
Post Options Post Options   Quote oisin_dubh Quote  Post ReplyReply Direct Link To This Post Posted: 05 May 2008 at 2:54am
This is probably truly inelegant - but may help.
For my small xml database I made xslts for the main data and also created seperate pages to call the main category- that is local region.
(http://www.essauk.com). Users can click on a local link eg North West or Scotland or London to obtain all the information regarding members in that area. The Notes area can contian extra specified hyperlnks if you want pictures, their own web page etc.
Imnot sure if this helps with your problem, I was thinkng you could have a menu that offers Wire cages with a subsequent sub menu for the various types, and another main choice for (I dont Know) Wire Widgets and deolve the sub menus for Big, deluxe etc.
Hope this helps. Oh there is also a UK image map that links to the same info - you could even use the images to link to the xml descriptions?
D
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.656 seconds.