Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 1st, 2006, 09:25 AM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
Default display bullets in a datagrid..

hi all,

can anyone please tel me how to display bullets in a datagrid column?
i am using VS.NET 2003

eg: of the format

              datagrid

            name age POB

         . xxxx yy zzzzzz


thanks in advance





 
Old September 1st, 2006, 10:25 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

Hi,

You can do this by adding TemplateColumns to the datagrid. In this example the Status is a bit in the database, a Boolean variable in ASP.NET so that when it is either True or False I have a .gif named true.gif and a false.gif.

Code:
<Columns>
   <asp:TemplateColumn   HeaderText="Status" HeaderStyle-Wrap="False" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
    <ItemTemplate>
<img src="/images/icons/<%#DataBinder.Eval(Container.DataItem, "Status")%>.gif" height="16" width="16" border="0"></a>   
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
You can also run a function on the Container.DataItem and have it return bullet.gif or any other image depending on what the return value is for that column.

Hope that helps to get you started in the right direction.

Good luck,
Richard

 
Old September 1st, 2006, 12:29 PM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks a lot







Similar Threads
Thread Thread Starter Forum Replies Last Post
display datagrid item shwetarani2002 ASP.NET 1.0 and 1.1 Basics 1 July 16th, 2007 07:47 AM
Datagrid display Lovehead VB.NET 2002/2003 Basics 1 January 20th, 2007 05:12 PM
Datagrid display deadrocker .NET Web Services 1 February 12th, 2005 07:04 AM
RichTextBox Control - Bullets qadeer05 BOOK: Professional C#, 2nd and 3rd Editions 0 August 17th, 2004 04:15 PM
Bullets formatting with UL tag apd8x HTML Code Clinic 1 July 30th, 2003 05:27 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.