Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

GridView Row Edit Cell Value in ASP.NET 2.0

Posted on 2010-08-13
2
Medium Priority
?
788 Views
Last Modified: 2013-11-07
Hello Experts,

I need a cell value from Grid View Row_Edit.

Qty Name State
1     John    CA
2     DAVID  FL

When I edit second row, I need value of Name, I did something like this:

 Protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView1.RowEditing

Dim strName as string = GridView1.Rows(e.NewEditIndex).Cells(1).Text

 I get strName = ""


End Sub


How can I get cell value????
0
Comment
Question by:ASPDEV
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Accepted Solution

by:
Kamal Khaleefa earned 2000 total points
ID: 33435610
try one of this

Dim strName as string = GridView1.Rows(e.NewEditIndex).Cells(0).Text

or

Dim strName as string = GridView1.Rows(e.NewEditIndex).Cells(2).Text

of
Dim strName as string = GridView1.Rows(e.NewEditIndex).FindControl("ID Of your Controll")
0
 

Author Closing Comment

by:ASPDEV
ID: 33488340
Thanks,

It worked:
Dim EntryType As Label = GridView1.Rows(e.NewEditIndex).Cells(3).FindControl("lbltype")
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question