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: Wed, 15 Aug 2007 03:24:00 -0700,    posted on: microsoft.public.dotnet.framework.aspnet.datagridcontrol        back       

Thread Index
  1    Ben.
          2    Eliyahu Goldin


Hiding blank rows in a datagrid   
Hi 

I have a bound datagrid in my page.  I want to hide rows where there is no 
data, is this possible.

Example - 

Row 1: Name      | TestNameValue
Row 2: Address   | 
Row 3: Phone      | 08322232
Row 4: FAX         | 

Would be displayed as 

Row 1: Name      | TestNameValue
Row 2: Phone      | 08322232

(although the next 'page' would display address if it contained a value!)

Thanks in advance,

Ben.
Date:Wed, 15 Aug 2007 03:24:00 -0700   Author:  

Re: Hiding blank rows in a datagrid   
Handle RowDataBound event. In the event detect empty-data rows and set for 
them Visible=false.

-- 
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"Ben."  wrote in message 
news:372D8A3D-D90C-41C5-8760-C3B5D58C256B@microsoft.com...

> Hi
>
> I have a bound datagrid in my page.  I want to hide rows where there is no
> data, is this possible.
>
> Example -
>
> Row 1: Name      | TestNameValue
> Row 2: Address   |
> Row 3: Phone      | 08322232
> Row 4: FAX         |
>
> Would be displayed as
>
> Row 1: Name      | TestNameValue
> Row 2: Phone      | 08322232
>
> (although the next 'page' would display address if it contained a value!)
>
> Thanks in advance,
>
> Ben.
> 
Date:Wed, 15 Aug 2007 15:26:49 +0300   Author:  

Google
 
Web dotnetnewsgroup.com


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