Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Get GridView Cell Value

Reply
Thread Tools

Get GridView Cell Value

 
 
Chris
Guest
Posts: n/a
 
      04-05-2006
Hi,

In ASP.NET 2005, I am using a gridview control. I have some Buttons in
gridview for opening different forms. I use ROWCOMMAND event for
retrieving the name of the button pressed.

Can I retrieve from which row the button was pressed (ex.
grv_reports.Rows(0).Cells(4).Text) ? I have the primarykey hidden in
gridview columns and I want to send it as a parameter to the new form I
will open.


Protected Sub gridview_RowCommand(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewCommandEventArgs ) Handles
grv_reports.RowCommand
If e.CommandName = "Send" Then

End If

Thanks a lot.

 
Reply With Quote
 
 
 
 
Jan Hyde
Guest
Posts: n/a
 
      04-06-2006
"Chris" <(E-Mail Removed)>'s wild thoughts were released on
5 Apr 2006 06:54:08 -0700 bearing the following fruit:

>Hi,
>
>In ASP.NET 2005, I am using a gridview control. I have some Buttons in
>gridview for opening different forms. I use ROWCOMMAND event for
>retrieving the name of the button pressed.
>
>Can I retrieve from which row the button was pressed (ex.
>grv_reports.Rows(0).Cells(4).Text) ? I have the primarykey hidden in
>gridview columns and I want to send it as a parameter to the new form I
>will open.
>
>
> Protected Sub gridview_RowCommand(ByVal sender As Object, ByVal e As
>System.Web.UI.WebControls.GridViewCommandEventArg s) Handles
>grv_reports.RowCommand
> If e.CommandName = "Send" Then
>
> End If
>
>Thanks a lot.


Take a look at the help file for

"GridView.RowCommand Event"

There is an example given there.





Jan Hyde (VB MVP)

--
f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng.

 
Reply With Quote
 
 
 
 
Chris
Guest
Posts: n/a
 
      04-07-2006
Thanks a lot, Jan. Sometimes the property names are not very clear,
like commandargument.

 
Reply With Quote
 
Jan Hyde
Guest
Posts: n/a
 
      04-07-2006
"Chris" <(E-Mail Removed)>'s wild thoughts were released on
6 Apr 2006 22:51:53 -0700 bearing the following fruit:

>Thanks a lot, Jan. Sometimes the property names are not very clear,
>like commandargument.


I hear that

I also find that the help often tells me there no help
available so I go to the index and type the exact same thing
and there is the very topic I need.



Jan Hyde (VB MVP)

--
Divorce: Going through a change of wife. (Henny Youngman)

 
Reply With Quote
 
imranwahabit imranwahabit is offline
Junior Member
Join Date: May 2009
Posts: 1
 
      06-14-2009
hello bro i am mohammed imran working on asp.net,i am having task where i should change the gridview column values into multilanguage so can any one help me out,how to change the column values and wats the code of it,waiting for ur reply,
MY emailid:(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
get value of a cell in a gridview graphicsxp ASP .Net 12 02-20-2008 06:52 PM
get cell value within gridview Mike ASP .Net 14 10-18-2007 06:18 PM
How to get Gridview cell value on select? Dave Hewes ASP .Net Web Controls 1 02-28-2007 06:19 PM
Gridview: Get the value in the cell G. Whiz ASP .Net 1 03-01-2006 10:21 PM
moving to cell Y if cell X has value Z. Clarke Rice Computer Support 0 06-30-2003 09:35 AM



Advertisments