J
jobs at webdos
I have a formview that will either edit or insert records into a
database. when I call the page with a query string ?x= its goes to edit
mode and loads data from a datasource in the form and load data into
the dropdown (from another datasource) with no problem.
I'm using the same dropdownlist tag for both edit and insert, however
the dropdown only get populated in insert mode...
<aspropDownList ID="RouteCodeList" runat="server" SelectedValue='<%#
Bind("routeCode") %>' DataTextField="routeCode" DatasourceID=
"SQLRouteCodes">
</aspropDownList><br />
I've tried adding AppendDataBoundItems=true , and have tried replacing
the selectedvalue with ="", in insert mode it simply does not load the
entries.
Also, I've tried loading entries using findcontrol, but that gives me
an instance error tell me I need to specify new. I've tried Item(0) and
row..
CType(RateFormView.FindControl("RouteCodeList"),
DropDownList).Items.Add("xxx")
Anybody, starting a formview in insert mode and populating a dropdown
beforehand? How?
Thanks.
database. when I call the page with a query string ?x= its goes to edit
mode and loads data from a datasource in the form and load data into
the dropdown (from another datasource) with no problem.
I'm using the same dropdownlist tag for both edit and insert, however
the dropdown only get populated in insert mode...
<aspropDownList ID="RouteCodeList" runat="server" SelectedValue='<%#
Bind("routeCode") %>' DataTextField="routeCode" DatasourceID=
"SQLRouteCodes">
</aspropDownList><br />
I've tried adding AppendDataBoundItems=true , and have tried replacing
the selectedvalue with ="", in insert mode it simply does not load the
entries.
Also, I've tried loading entries using findcontrol, but that gives me
an instance error tell me I need to specify new. I've tried Item(0) and
row..
CType(RateFormView.FindControl("RouteCodeList"),
DropDownList).Items.Add("xxx")
Anybody, starting a formview in insert mode and populating a dropdown
beforehand? How?
Thanks.