ok I have a gridview that gets its datasource from a class using subsonic method RetrieveAllActive()
The gridview displayed now depends on a selection in a drop down list generated dynamically.
The datasource calls used to look like this
if (drp_Tables.SelectedValue == "Asset")
{
gv_Display_The_Data.DataSource = Asset.RetrieveAllActive();
}
if (drp_Tables.SelectedValue == "AssetType")
{
gv_Display_The_Data.DataSource = AssetType.RetrieveAllActive();
}
I now need to call the datasource using the selected value in drp_Tables something like this
gv_Display_The_Data.DataSource = drp_Tables.SelectedValue.RetrieveAllActive();
Is there anyway to do this ? how do I set the namespace to be called to the value stored in drp_Tables.SelectedValue.
Any help would be appreciated
Richie
Richie CutlerPosted Mar 28, 2012, 7:17 AM
It wont allow the call because drp_Tables_SelectedValue doesnt have a method called RetrieveAllActive().
I need to know how to set the data inside drp_Tables.SelectedValue as a recognised classname
SenthilkumarPosted Mar 28, 2012, 6:56 AM
It will now allow you to use the value of the drop down instead of class name.
It will consider like string.