I'm trying to accomplish the equivalent of the code below, but with a
two-way data binding. GetReportsTo() will just return a default
selection in the case of a NULL DB entry. I thought I could just
replace Eval with Bind, but that gives me: "The name 'Bind' does not
exist in the current context."
Is it possible to do this in the control, or do I need to modify the
DataSource?
<EditItemTemplate>
<asp:DropDownList ID="DropDownList2" runat="server"
DataSourceID="SqlDataSource2" DataTextField="Name"
DataValueField="EmployeeID"
SelectedValue='<%# GetReportsTo(Eval("ReportsTo")) %>'
AppendDataBoundItems="True">
<asp:ListItem Selected="True" Value="0">(none)</
asp:ListItem>
</asp:DropDownList>
</EditItemTemplate>
ForYourConsternation@yahoo.com - 25 Jul 2007 16:16 GMT
On Jul 24, 3:37 pm, ForYourConsternat...@yahoo.com wrote:
> I'm trying to accomplish the equivalent of the code below, but with a
> two-way data binding. GetReportsTo() will just return a default
[quoted text clipped - 15 lines]
> </asp:DropDownList>
> </EditItemTemplate>
If this is just a stupid question, please say so. No one will reply
to this question anywhere.