Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 30th, 2003, 12:52 AM
Registered User
 
Join Date: Nov 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to basant Send a message via MSN to basant Send a message via Yahoo to basant
Default how to access cell of datagrid?

Hi,
 i have used a datagrid i want to access the cell text of that grid while i use datagrid1.items(i).cell(0).text with in a for loop but it gives an empty string , plz help me in this regard..
thanks


s/w engg
 
Old December 30th, 2003, 02:01 PM
Registered User
 
Join Date: Dec 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try Following, It works....

Dim myRow As System.Web.UI.WebControls.DataGridItem
Dim iloop As Int32 = 0
Dim NoOfRows As Integer

While (iloop < NoOfRows)
     myRow = DataGrid1.Items(iloop)
     <Value> = myRow.Cells(0).Text
     iloop = iloop + 1
End While

You will get cell value in <value>

Thanks
Sanjay





Similar Threads
Thread Thread Starter Forum Replies Last Post
Highlight Datagrid Cell derekl ASP.NET 1.0 and 1.1 Basics 1 July 28th, 2006 06:12 AM
Getting DataGrid Cell Data lifewarped General .NET 2 February 20th, 2005 07:00 PM
DataGrid cell events?? Help Kathryn ASP.NET 1.0 and 1.1 Basics 4 January 31st, 2005 10:12 AM
DataGrid Cell mrideout BOOK: Beginning ASP.NET 1.0 0 August 17th, 2004 12:34 PM
Access cell in DataGrid - wrong casting? drasko ASP.NET 1.0 and 1.1 Basics 4 December 22nd, 2003 04:45 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.