Re: DataList and scrollbar
From: Monalisa (monalisa_at_mitrasoft.co.id)
Date: 01/11/05
- Next message: Philip Wilson: "Re: Dynamically Generating Imagemaps??"
- Previous message: Ken Cox [Microsoft MVP]: "Re: Removing Labels When Using Validation Controls"
- In reply to: Saravana: "Re: DataList and scrollbar"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 11 Jan 2005 15:45:15 +0700
I cannot open the link. But thx anyway. I already done it.
But I need a help (because I'm new comie to .NET).
Please look this coding
<asp:Panel id="Panel1" style="OVERFLOW: scroll" runat="server"
BorderStyle="Groove" Width="789px"
Height="400px">
<asp:DataList id="DataList1" runat="server" BorderStyle="None"
BorderWidth="1px" BackColor="White"
BorderColor="#CC9966" CellPadding="4" GridLines="Both">
<SelectedItemStyle Font-Bold="True" ForeColor="#663399"
BackColor="#FFCC66"></SelectedItemStyle>
<EditItemStyle Font-Bold="True" ForeColor="Fuchsia"
BackColor="LightGreen"></EditItemStyle>
<ItemStyle ForeColor="#330099" BackColor="White"></ItemStyle>
<ItemTemplate>
<asp:ImageButton id="imgBtnEdit" runat="server"
BorderStyle="Groove" AlternateText="Cancel" ImageUrl="images/edit.jpg"
CommandName="edit" ToolTip="Edit"></asp:ImageButton>
<%# DataBinder.Eval(Container.DataItem, "UserFullName") %>
<%# DataBinder.Eval(Container.DataItem, "EntryDateTime") %>
<%# DataBinder.Eval(Container.DataItem, "Notes") %>
</ItemTemplate>
<FooterStyle ForeColor="#330099" BackColor="#FFFFCC"></FooterStyle>
<HeaderStyle Font-Bold="True" ForeColor="#FFFFCC"
BackColor="#990000"></HeaderStyle>
<EditItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "UserFullName") %>
<%# DataBinder.Eval(Container.DataItem, "EntryDateTime") %>
<asp:TextBox id=txtEdit Runat="server" BorderStyle="Groove"
Width="100px" Height="30px" TextMode="MultiLine" Text='<%#
DataBinder.Eval(Container.DataItem, "Notes") %>'>
</asp:TextBox>
<asp:ImageButton id="imgBtnCancel" runat="server"
BorderStyle="Groove" AlternateText="Cancel" ImageUrl="images/reset.jpg"
CommandName="cancel" ToolTip="Cancel"></asp:ImageButton>
<asp:ImageButton id="imgBtnUpdate" runat="server"
BorderStyle="Groove" AlternateText="Update" ImageUrl="images/save.jpg"
CommandName="update" ToolTip="Update"></asp:ImageButton>
</EditItemTemplate>
</asp:DataList>
</asp:Panel>
private void DataList1_EditCommand(object source,
System.Web.UI.WebControls.DataListCommandEventArgs e)
{
DataList1.EditItemIndex = e.Item.ItemIndex;
DataList1.DataBind();
}
The problem is when I click edit, the datalist return blank... not display
edititemtemplate why?
Tks
- Next message: Philip Wilson: "Re: Dynamically Generating Imagemaps??"
- Previous message: Ken Cox [Microsoft MVP]: "Re: Removing Labels When Using Validation Controls"
- In reply to: Saravana: "Re: DataList and scrollbar"
- Messages sorted by: [ date ] [ thread ]