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: Mon, 9 Jul 2007 12:21:33 -0600,    posted on: microsoft.public.dotnet.framework.aspnet.datagridcontrol        back       

Thread Index
  1    eagle
          2    martin marinov
                 3    eagle


using buttons in a gridview   
In the following article, it says to have a button ina  gridview, you need 
to capture the ItemCommand event.  Well, there is no ItemCommand event in 
the gridview.  So I use the RowCommand.  The Article says to use the 
e.item.itemindex to determine the row that was selected, well the RowCommand 
has no e.item.itemindex proeprty.  So how am I supposed to put a button in a 
gridview.

http://msdn2.microsoft.com/en-us/library/df6hth3s(vs.80).aspx
Date:Mon, 9 Jul 2007 12:21:33 -0600   Author:  

Re: using buttons in a gridview   
Hello eagle,


> In the following article, it says to have a button ina  gridview, you
> need to capture the ItemCommand event.  Well, there is no ItemCommand
> event in the gridview.  So I use the RowCommand.  The Article says to
> use the e.item.itemindex to determine the row that was selected, well
> the RowCommand has no e.item.itemindex proeprty.  So how am I supposed
> to put a button in a gridview.
> 
> http://msdn2.microsoft.com/en-us/library/df6hth3s(vs.80).aspx
> 



Yes you are correct that in the GridViewCommandEventArgs class there is no 
index of the row. Fo this purpose you can follow the sample of this article 
that describes how you can handle the index of the row:
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowcommand.aspx

Regards
Martin
Date:Tue, 10 Jul 2007 07:23:14 +0000 (UTC)   Author:  

Re: using buttons in a gridview   
Thanks!  That works!

"martin marinov"  wrote in message 
news:21d271394b428c990f37597fe4b@msnews.microsoft.com...

> Hello eagle,
>
>> In the following article, it says to have a button ina  gridview, you
>> need to capture the ItemCommand event.  Well, there is no ItemCommand
>> event in the gridview.  So I use the RowCommand.  The Article says to
>> use the e.item.itemindex to determine the row that was selected, well
>> the RowCommand has no e.item.itemindex proeprty.  So how am I supposed
>> to put a button in a gridview.
>>
>> http://msdn2.microsoft.com/en-us/library/df6hth3s(vs.80).aspx
>>
>
>
> Yes you are correct that in the GridViewCommandEventArgs class there is no 
> index of the row. Fo this purpose you can follow the sample of this 
> article that describes how you can handle the index of the row:
> http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowcommand.aspx
>
> Regards
> Martin
>
> 
Date:Thu, 12 Jul 2007 06:45:12 -0600   Author:  

Google
 
Web dotnetnewsgroup.com


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