View Single Post
  #1 (permalink)  
Old September 20th, 2007, 04:58 AM
shashipandey shashipandey is offline
Registered User
 
Join Date: Sep 2007
Location: Patna, Bihar, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Filtering Template columns in Detailsview

Hi,

I am using a Detailsview control for inserting/updating the data. The detailsview has two template columns for taking two input for State and Cities using Dropdownlist. The StateDropdownlist is using StateDataSource as its datasource and CityDropdownlist is using CityDataSource's GetCityByState method as its datasource which has StateCode as its inputparameter.

All I wanted to do is to filter the citydwopdownlist based on the selection from state dropdownlist.

On CityDataSource_Selecting event I tried to pass

 e.InputParameters["StateCode"] = Convert.ToString(((DropDownList)(DetailsView1.Find Control("StateDropDownlist"))).SelectedValue);

But I am not able to filter the City List based on the State selection.

Any other way to do it?