Filtering data in DataGrid and DataList

N

New User

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.
 
S

Saravana [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top