What I would like to see happen, is that a user Selects the OTypeName ddl. Based on that selection, the OSpecies ddl is enabled and populates values based on the OTypeName ddl. The same can be said in relation to OSpecies and OVariety.
The user then inputs their own information into OAge, OYields, OPlantDate, and OPlantFrom.
The rest of the fields in the footer row are labels that will be populated based on the final OVariety selection.
The Insert button then adds all these columns to the gridview.
I only need help with populating one ddl based on the ddl selection of another and how to populate a label based on a ddl selection.
Here's my code in the aspx file:
runat="server"
AutoPostBack="True"
DataSourceID="dsTypeName"
DataTextField="OrchardTypeName"
DataValueField="OrchardTypeID" >
runat="server"
AutoPostBack="True"
DataSourceID="dsTypeName"
DataTextField="OrchardTypeName"
DataValueField="OrchardTypeID"
>
I'm not sure what to put in the aspx.cs file but here's what I have so far concerning the Index Change for the ddl:
public void ddlTypeName_SelectedIndexChanged(object sender, EventArgs e)
{
//Enable ddlSpecies
//Populate ddlSpecies based on ddlTypeName selection
var ddlTypeValue = ddlTypeName.SelectedValue;
}
Any help would be much appreciated!


Munesh SharmaRank #174 · 13.9K reputationPosted Apr 8, 2016, 7:59 PM EDT
Munesh SharmaRank #174 · 13.9K reputationPosted Apr 8, 2016, 8:00 PM EDT
Chandu KumawatRank #1,449 · 1.1K reputationPosted Apr 8, 2016, 10:21 PM EDT
Thomas Gaillard4 reputationPosted May 19, 2016, 4:34 AM EDT