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, 9 May 2007 15:23:41 -0500,    posted on: microsoft.public.dotnet.framework.aspnet.datagridcontrol        back       

Thread Index
  1    Ross Culver


Object Reference Not Set / GridView TemplateItem   
Here's a curious one . . .

In one column of my gridview, I have two templateitems, one above the other 
(namely company name and street address, respectively).  Works fine.

On gv.SelectedIndexChange I capture the street address into a session 
variable for further processing thusly (addr = 
me.gv.SelectedRow.Cells(2).Text) and when the result set is more than 10 (my 
PageSize) everything's fine.  But whenever the result set is less than 10 
resulting in only one page, I get the ole' "object reference not set ....." 
message on gvSelectIndexChange.

I thought it might be occurring whenever the company name field was blank, 
but that's not the problem.  I would specify the exact templateitem since 
there are actually two templateitems in the same cell, but I don't know how 
to do that using code behind.

Any suggestions?

Thanks,

Ross
Date:Wed, 9 May 2007 15:23:41 -0500   Author:  

Google
 
Web dotnetnewsgroup.com


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