How to get a cell value from gridview?
How to get a cell value from gridview?
How to get a cell value from gridview?
How to get a cell value from gridview?
How to get a cell value from gridview?
How to get a cell value from gridview? How to get a cell value from gridview? How to get a cell value from gridview? How to get a cell value from gridview? How to get a cell value from gridview? How to get a cell value from gridview? How to get a cell value from gridview? How to get a cell value from gridview?
How to get a cell value from gridview? How to get a cell value from gridview?
How to get a cell value from gridview?
Go Back  Xtreme Visual Basic Talk > > > How to get a cell value from gridview?


Reply
 
Thread Tools Display Modes
  #1  
Old 01-21-2008, 03:10 PM
moramoga moramoga is offline
Newcomer
 
Join Date: Oct 2007
Posts: 11
Default How to get a cell value from gridview?


Hi guys,

I have a gridview, that has 3 columns, a delete button, name and age.
When I click the delete button I call the function Selected_Index_Change, in the function I need to call another function, lets call it function x, and the need to send function x the name of the person in the selected row, how can I do that?
Reply With Quote
  #2  
Old 01-23-2008, 06:41 AM
PoPov PoPov is offline
Newcomer
 
Join Date: Jan 2008
Posts: 3
Default

For example:
Code:
    Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
        Me.Label1.Text = GridView1.Rows(e.CommandArgument.ToString).Cells(4).Text.ToString
    End Sub
Reply With Quote
  #3  
Old 01-23-2008, 08:57 AM
moramoga moramoga is offline
Newcomer
 
Join Date: Oct 2007
Posts: 11
Default

Thanks PoPov,

I also get the value from the selected row with tihis code:

Me.GridView2.SelectedRow.Cells(1).Text
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
How to get a cell value from gridview?
How to get a cell value from gridview?
How to get a cell value from gridview? How to get a cell value from gridview?
How to get a cell value from gridview?
How to get a cell value from gridview?
How to get a cell value from gridview? How to get a cell value from gridview? How to get a cell value from gridview? How to get a cell value from gridview? How to get a cell value from gridview? How to get a cell value from gridview? How to get a cell value from gridview?
How to get a cell value from gridview?
How to get a cell value from gridview?
 
How to get a cell value from gridview?
How to get a cell value from gridview?
 
-->