Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DataList and scrollbar

467 views
Skip to first unread message

Monalisa

unread,
Jan 10, 2005, 4:30:33 AM1/10/05
to
Dear all,

How can i make scrollbar for datalist?


Ken Cox [Microsoft MVP]

unread,
Jan 10, 2005, 9:15:20 AM1/10/05
to
Put it inside a panel control and set the style like this:

STYLE="width: 200px; height: 200px; overflow: scroll;"


"Monalisa" <mona...@mitrasoft.co.id> wrote in message
news:%23TO2Jav...@TK2MSFTNGP10.phx.gbl...

Saravana

unread,
Jan 10, 2005, 1:58:17 PM1/10/05
to
Check out this article, this article explains for datagrid. You can use the
same concept for datalist also,
http://www.microsoft.com/india/msdn/articles/CreatingaScrollableDataGridWebServerControl.asp

--
-Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com

"Monalisa" <mona...@mitrasoft.co.id> wrote in message
news:%23TO2Jav...@TK2MSFTNGP10.phx.gbl...

Monalisa

unread,
Jan 11, 2005, 1:33:41 AM1/11/05
to
Tks a lot it's works.

"Ken Cox [Microsoft MVP]" <BANSPAM...@sympatico.ca> wrote in message
news:uTjcO7x9...@TK2MSFTNGP14.phx.gbl...

Monalisa

unread,
Jan 11, 2005, 3:45:15 AM1/11/05
to
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


ashish sharma

unread,
Oct 26, 2009, 6:35:06 AM10/26/09
to
0 new messages