.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Error while accessing cell values in GridView using C#

Posted By: Shivani     Posted Date: February 19, 2011    Points:2   Category :ASP.Net
How to retreive cell values of a row in gridview in asp.net 2.0

dataGV.Rows[1].Cells[2].ToString()

Above code gives following error. Grid has 4 columns & there are data. I want to retrieve all row data values when user press EDIT on any row. I don't want to edit in the grid itself.

Specified argument was out of the range of valid values. Parameter name: index

Responses
Author: Jayakumar             
Posted Date: February 19, 2011     Points: 5   

hi

index did not match

change this

ataGV.Rows[0].Cells[0].ToString()

Regards
Name : R.Jayakumar(JK)
Email Id : kumaraspcode2009@gmail.com
Author: Blessy Baby             
Posted Date: February 20, 2011     Points: 5   

Hi,

are you want to retrive data of the selected row. If so use rowindex to find the row and use grid.Rows[index].Cells[columncount].ToString()

Blessy Baby
Project Lead
Digitalmesh Softech India (p) Limited
Cochin,Kerala


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend