data caching

wissam1

Newcomer
Joined
Mar 1, 2004
Messages
6
hello

i have two dropdownlists, the first dropdownlist contains all the projects and the second contains the stages for the selected project if i make the following:

cache.insert("CacheProjects",datareaderProjects)

CacheInsert("CacheAllProjectstages",datareaderAllProjectStages)

so the first cache contains all the projects and the second contains all the stages for all the projects ,so how can i load the stages for the selected project in the stages dropdownlist from the CacheAllProjectstages (so i give the CacheAllProjectstages the projectid and it will return the stages for this projectid)

so i need a solution

thank you for the help and for the time
 
What are datareaderProjects and datareaderAllProjectStages? If they are DataReaders as the names suggest then you will have problems reusing the objects.
If they are DataSets / DataTables things will be a lot easier as you will be able to bind to a DataView rather than the DataTable directly.
Simply create a DataView on top of the Stages DataTable and then set it's .RowFilter property to be the criteria of what to display - this can be done in the SelectedIndexChanged event of the Projects dropdown. Then bind the other dropdown to the dataview.
 
Back
Top