J
jobs at webdos
My challenge is I need to populate a formview's dropdownlist even when
my datasource does not find a record to bind with. I'm trying to avoid
binding in the codebehind.
This code works works fine when ratedatasource finds a row, but when it
doesnot my dropdowns dont get popultated. Keep in mind I have two
datasources, one for the form the other for my dropdownlist.
<asp:FormView ID="RateFormView" runat="server"
DataSourceID="RateDataSource" DefaultMode="Insert" SkinID="FormView">
<asp
ropDownList ID="RouteCodeList" AppendDataBoundItems=true
runat="server" SelectedValue='<%# Bind("routeCode") %>'
DataTextField="routeCode" DatasourceID= "SQLRouteCodes">
</asp
ropDownList><br />
In the insertitemtemplate, I the dropdowns don't populate at all unless
I force them in on the codebehind.
my datasource does not find a record to bind with. I'm trying to avoid
binding in the codebehind.
This code works works fine when ratedatasource finds a row, but when it
doesnot my dropdowns dont get popultated. Keep in mind I have two
datasources, one for the form the other for my dropdownlist.
<asp:FormView ID="RateFormView" runat="server"
DataSourceID="RateDataSource" DefaultMode="Insert" SkinID="FormView">
<asp
runat="server" SelectedValue='<%# Bind("routeCode") %>'
DataTextField="routeCode" DatasourceID= "SQLRouteCodes">
</asp
In the insertitemtemplate, I the dropdowns don't populate at all unless
I force them in on the codebehind.