J
J 2 the B
I need to show a datalist in edit mode right when the page loads.
I've tried this, but nothing shows up:
<ASPatalist id="dlComments" Font-name="Arial" Font-size="11px"
Runat="server" CellPadding="5" CellSpacing="0" RepeatColumns="5"
RepeatDirection="Vertical" RepeatLayout="Table" Gridlines="Both">
<EditItemTemplate>
<tr>
<td class="update-fields" nowrap>Comments</td>
<td class="text" width="343"><asp:TextBox id="txtComments"
runat="server" MaxLength="40" Columns="40" Text='<%#
Container.DataItem("Comments") %>' /></td>
</tr>
</EditItemTemplate>
</ASPatalist>
When I change EditItemTemplate to ItemTemplate it shows up fine.
Normally I'll put the datalist into Edit Mode when the user clicks
'Edit'. Using this code:
Sub dlComments_Edit(sender as Object, e as DataListCommandEventArgs)
dlComments.EditItemIndex = e.Item.ItemIndex
BindData()
End Sub
But how can I put the Datalist in Edit Mode on page load?? I'm sure
it's simple but I can't seem to figure it out.
Thanks for any help.
I've tried this, but nothing shows up:
<ASPatalist id="dlComments" Font-name="Arial" Font-size="11px"
Runat="server" CellPadding="5" CellSpacing="0" RepeatColumns="5"
RepeatDirection="Vertical" RepeatLayout="Table" Gridlines="Both">
<EditItemTemplate>
<tr>
<td class="update-fields" nowrap>Comments</td>
<td class="text" width="343"><asp:TextBox id="txtComments"
runat="server" MaxLength="40" Columns="40" Text='<%#
Container.DataItem("Comments") %>' /></td>
</tr>
</EditItemTemplate>
</ASPatalist>
When I change EditItemTemplate to ItemTemplate it shows up fine.
Normally I'll put the datalist into Edit Mode when the user clicks
'Edit'. Using this code:
Sub dlComments_Edit(sender as Object, e as DataListCommandEventArgs)
dlComments.EditItemIndex = e.Item.ItemIndex
BindData()
End Sub
But how can I put the Datalist in Edit Mode on page load?? I'm sure
it's simple but I can't seem to figure it out.
Thanks for any help.