C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Access the content of datagrid or gridview


Posted Date: 19 Aug 2008    Resource Type: Code Snippets    Category: ASP.NET GridView

Posted By: Dilip Kumbhar       Member Level: Gold
Rating:     Points: 10



U can access the content of datagrid using following code-

Dim dtgItem As DataGridItem
Dim txtRemark As TextBox
Dim strRemark as String

For Each dtgItem In dtgMaster.Items
txtRemark = dtgMaster.Items(intI).Cells(2).Controls(1)
strRemark=txtRemark.Text

intI = intI + 1
Next

In the above code ,I have considered datagrid dtgMaster to access its
value.
In the second column,I have considered that remark is displayed in
textbox.So I have used cells(2).I have used Controls(1) since I have
considered only one control to be present in second column.For accessing data of gridview use GridViewItem instead of DataGridItem.




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Access the content of datagrid or gridview  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Repopulate Grid-Using DropDownList
Previous Resource: Data from database to Grid View
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET GridView


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

fax server

Contact Us    Privacy Policy    Terms Of Use