C
Christian
Hi,
I have a datagrid on an ASP.NET page, which has a custom columntemplate. In
this columntemplate I
would like to have a DropDownList, which is shown, when the user edits the
record. However,
I can't manage to bind the DropDownListField to the underlaying dataset, so
it shows
the contents of the underlying database field.
Here is the relevant ASP Code:
<EditItemTemplate>
<aspropDownList id=dlMediaType runat="server" DataSource='<%#
DataBinder.Eval(Container, "DataItem.type") %>' Width="168px" Text='<%#
DataBinder.Eval(Container, "DataItem.type") %>'>
</aspropDownList>
</EditItemTemplate>
The field from the underlaying table is called "Type".
What I get with this code is, that the DropDownList displays a single
character of the contents of
the "type" field in each line of the DropDownList; e.g. if the type field is
"DVD (TV)", the
DropDownList contains
D
V
D
(
T
V
)
what's wrong here ? Thanx,
Christian
I have a datagrid on an ASP.NET page, which has a custom columntemplate. In
this columntemplate I
would like to have a DropDownList, which is shown, when the user edits the
record. However,
I can't manage to bind the DropDownListField to the underlaying dataset, so
it shows
the contents of the underlying database field.
Here is the relevant ASP Code:
<EditItemTemplate>
<aspropDownList id=dlMediaType runat="server" DataSource='<%#
DataBinder.Eval(Container, "DataItem.type") %>' Width="168px" Text='<%#
DataBinder.Eval(Container, "DataItem.type") %>'>
</aspropDownList>
</EditItemTemplate>
The field from the underlaying table is called "Type".
What I get with this code is, that the DropDownList displays a single
character of the contents of
the "type" field in each line of the DropDownList; e.g. if the type field is
"DVD (TV)", the
DropDownList contains
D
V
D
(
T
V
)
what's wrong here ? Thanx,
Christian