473,387 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Filtering data in DataGrid and DataList

I have a xml file for datasource.e.g
<Persons>
<Person>
<Name>User1</Name>
<State>NJ</State>
</Person>
<Person>
<Name>User2</Name>
<State>WA</State>
</Person>
</Persons>

I have a dropdown list which I select a state from list.
Is such property or event in Datalist or DataGrid that
when I select e.g NJ as a state I would only display
<Person> data for just that state (Filter out).

Thank you in advance.

Nov 18 '05 #1
1 1738
In onselectchanged of dropdowlist you can write a code to filter your
datasource of datalist or datagrid corresponding to the selected item in
dropdownlist and then bind it to the datalist or datagrid . In ASP.NET 1.1
there is not direct way for doing this, but in ASP.NET 2.0 this is going to
be very simple. Wait and watch.

--
Saravana
Microsoft MVP - ASP.NET
www.extremeexperts.com

"New User" <an*******@discussions.microsoft.com> wrote in message
news:00****************************@phx.gbl...
I have a xml file for datasource.e.g
<Persons>
<Person>
<Name>User1</Name>
<State>NJ</State>
</Person>
<Person>
<Name>User2</Name>
<State>WA</State>
</Person>
</Persons>

I have a dropdown list which I select a state from list.
Is such property or event in Datalist or DataGrid that
when I select e.g NJ as a state I would only display
<Person> data for just that state (Filter out).

Thank you in advance.

Nov 18 '05 #2

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

Similar topics

0
by: Bob Rosen | last post by:
The description given in "Customizing Items Dynamically in the DataList or DataGrid Web Server Control" (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vbCode/...
0
by: Alex | last post by:
Interested in more .NET stuff visit www.dedicatedsolutions.co.uk The DataList is not as powerful as the DataGrid. It requires more work from you since it has no default data presentation format....
1
by: Craig Banks | last post by:
If a row of data in a dataset has a lot of columns the row displaying the data in a datagrid will run way off the screen. What I'd like to do is display a row of data over several datagrid rows so...
5
by: IGotYourDotNet | last post by:
I'm pulling data out of an oracle db and populating a datagrid such as this cars doors Cylinders chevy 4 6 ford 2 8 how can i make it such as cars ...
5
by: Stephanie_Stowe | last post by:
Hi. I am trying to get used to AS.NET. I have been doing ASP classic for years, and am now in a position to do ASP.NET. I am in the stumbling around until I get my bearings phase. I hope you will...
2
by: donnet | last post by:
Inside my .aspx file, I have a textbox populated with data from a dataset like this: <asp:TextBox text='<%# DataBinder.Eval(Container.DataItem, "Comment")%>' id="CommentText" runat="server"...
3
by: bbernieb | last post by:
Hi, All, Is it possible to access a variable inside of a data binding, without the variable being out of scope? (Note: On the DataBinder line, I get an error message that says "Name 'i' is...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
0
by: Chris | last post by:
I've been searching all over and think I am close, but keep getting the error "Index out of range" when trying to reference a nested datagrid when an OnEditCommand event is raised. When the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...

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.