Hi,
I have a TreeList control, with an insert template as below:
<EditFormSettings EditFormType="Template">
<FormTemplate>
<table>
<tr>
<td>Is this a header:
</td>
<td>
<asp:checkbox ID="cbIsHeader" runat="server" />
</td>
</tr>
<tr>
<td>Header Text:
</td>
<td>
<asp:TextBox ID="txtNewHeader" Text='<%# Bind("DepartmentList_Header")%>' runat="server">
</asp:TextBox>
</td>
</tr>
<tr>
<td>Department</td>
<td><asp:DropDownList runat="server" ID="ddlDepartments"/></td>
</tr>
</table>
<asp:Button ID="btnUpdate" Text="Insert"
runat="server" CommandName="PerformInsert"></asp:Button>
<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
CommandName="Cancel"></asp:Button>
<asp:HiddenField ID="hfParent" runat="server" Value='<%# Bind("DepartmentList_Parent")%>' />
</FormTemplate>
</EditFormSettings>
I am trying to pre-populate the drop down menu from a stored procedure, but not certain how this could be accomplished. Can anyone help?
Cheers,
Mark
I have a TreeList control, with an insert template as below:
<EditFormSettings EditFormType="Template">
<FormTemplate>
<table>
<tr>
<td>Is this a header:
</td>
<td>
<asp:checkbox ID="cbIsHeader" runat="server" />
</td>
</tr>
<tr>
<td>Header Text:
</td>
<td>
<asp:TextBox ID="txtNewHeader" Text='<%# Bind("DepartmentList_Header")%>' runat="server">
</asp:TextBox>
</td>
</tr>
<tr>
<td>Department</td>
<td><asp:DropDownList runat="server" ID="ddlDepartments"/></td>
</tr>
</table>
<asp:Button ID="btnUpdate" Text="Insert"
runat="server" CommandName="PerformInsert"></asp:Button>
<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
CommandName="Cancel"></asp:Button>
<asp:HiddenField ID="hfParent" runat="server" Value='<%# Bind("DepartmentList_Parent")%>' />
</FormTemplate>
</EditFormSettings>
I am trying to pre-populate the drop down menu from a stored procedure, but not certain how this could be accomplished. Can anyone help?
Cheers,
Mark