DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Fri, 27 Jul 2007 19:12:04 -0400,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    Jen
          2    Masudur


Programmatically changing text in a BoundColumn in a DataGrid?   
I have a BoundColumn that displays a numeric value.  I want to override the 
number if it is zero and display a string instead.  What's the easiest way 
to do that?

Thanks in advance.
Date:Fri, 27 Jul 2007 19:12:04 -0400   Author:  

Re: Programmatically changing text in a BoundColumn in a DataGrid?   
On Jul 28, 5:12 am, "Jen"  wrote:

> I have a BoundColumn that displays a numeric value.  I want to override the
> number if it is zero and display a string instead.  What's the easiest way
> to do that?
>
> Thanks in advance.


Hi...

in itemdataboud check the item you want to check and change the
value...

protected void GridView1_RowDataBound(object sender,
GridViewRowEventArgs e)
{
            if (e.Row.Cells[6].Text == "0")
                e.Row.Cells[6].Text = "Zero";
}

Thanks
Md. Masudur Rahman (Munna)
Kaz Software Ltd.
www.kaz.com.bd
http://munnacs.110mb.com
Date:Sat, 28 Jul 2007 08:37:30 -0000   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us