M
mateo
Hello,
I have a GridView inside which i want to show 3 dropdownList (one for
each Column).
So i've created 3 TemplateField
Continent
Country
City
1 -In the item Template i've drop a dropdownList for each one with a
corresponding ObjectDataSource (Which return a TableAdapter) and bind's
to the dropdowlist. Now if i don't bind a datasource to the gridview i
see nothing (no lines, no gridview, nothing). If i bind one of my
ObjectDataSource to it, the result is that i see the same number of
lines in the gridview that there is rows in the ObjectDataSource
binding to it. I want only one line (so that the user choose Continent
and then Country and finally City). So i made a struct containing 3
id's (ContinentId, CountryId, CityId) and a generic list of that struc
which i first populate with one default struct and then bind it to the
gridview. This way i have only one line in my gridview whith my 3
columns olding dropdowlist and i'm happy! the problem is my list is
always cleared ? Is there a way i can get the values selected in those
dropdownlist to be stored in my struct? (just though maybe i should use
object!)
2 - Also i want the second dropdownList to be filtered by the selection
of the first one, and the third by the selection of the second one. I'm
trying to use the FilterParameter but cannot seem to see my
dropdownlist object (they are in the itemTemplate). Is there a way i
can manage to get them ?
3 - Also when using the FilterParameters, (on two other dropdownlist
not in any gridview) the second dropdownlist will filter ok but never
clear it's list between changes of the first one ? so each time the
selectedValue of the first one change items are added to the second
one? Any Clues ?
Thanks for you help .
Mateo
I have a GridView inside which i want to show 3 dropdownList (one for
each Column).
So i've created 3 TemplateField
Continent
Country
City
1 -In the item Template i've drop a dropdownList for each one with a
corresponding ObjectDataSource (Which return a TableAdapter) and bind's
to the dropdowlist. Now if i don't bind a datasource to the gridview i
see nothing (no lines, no gridview, nothing). If i bind one of my
ObjectDataSource to it, the result is that i see the same number of
lines in the gridview that there is rows in the ObjectDataSource
binding to it. I want only one line (so that the user choose Continent
and then Country and finally City). So i made a struct containing 3
id's (ContinentId, CountryId, CityId) and a generic list of that struc
which i first populate with one default struct and then bind it to the
gridview. This way i have only one line in my gridview whith my 3
columns olding dropdowlist and i'm happy! the problem is my list is
always cleared ? Is there a way i can get the values selected in those
dropdownlist to be stored in my struct? (just though maybe i should use
object!)
2 - Also i want the second dropdownList to be filtered by the selection
of the first one, and the third by the selection of the second one. I'm
trying to use the FilterParameter but cannot seem to see my
dropdownlist object (they are in the itemTemplate). Is there a way i
can manage to get them ?
3 - Also when using the FilterParameters, (on two other dropdownlist
not in any gridview) the second dropdownlist will filter ok but never
clear it's list between changes of the first one ? so each time the
selectedValue of the first one change items are added to the second
one? Any Clues ?
Thanks for you help .
Mateo