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 !




Datagridview


Posted Date: 18 Jul 2008      Total Responses: 3

Posted By: vasantha       Member Level: Bronze     Points: 1



How to get values into textboxes when i click a row in datagrieview (In windows application)







Responses

Author: kavitha    18 Jul 2008Member Level: GoldRating:     Points: 1

http://www.codeproject.com/KB/database/grid101.aspx


Author: vasanthiraajan    19 Jul 2008Member Level: GoldRating:     Points: 3

hi

use this,
put it in mouse click event of grid

TextBox1.Text = DataGridView1.Rows(e.RowIndex).Cells(0).Value

here,
Cells(0) means - Ist Column of the Grid
.
.
.

Cells(n)



Author: Ashokkumar    19 Jul 2008Member Level: GoldRating:     Points: 4

hi
In a cellcontent clieck event try use this code

strRowIndex = dgvAlert.SelectedCells(0).RowIndex
strRes = dgvAlert.Rows(strRowIndex).Cells(In datagrid coumln No).Value.ToString
In strRowindex Gets clicked Row
in strRes gets the Correct value



Post Reply
You must Sign In to post a response.
Next : Dynamically adding empty rows to DataGridView
Previous : button click event in windows application C#
Return to Discussion Forum
Post New Message
Category: Windows

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use