TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Click DataGrideiew and Fill Textbox in .NET
Pintoo Yadav
Jun 05
2015
Code
1.2
k
0
1
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
private
void
dataGridView1_CellContentClick(
object
sender, DataGridViewCellEventArgs e)
{
int
i;
i = dataGridView1.SelectedCells[0].RowIndex;
//[CO_CODE],[CO_NAME],[Add1],[Add2],[Add3]
label2.Text = dataGridView1.Rows[i].Cells[0].Value.ToString();
lblbill.Text = dataGridView1.Rows[i].Cells[1].Value.ToString();
textBox1.Text = dataGridView1.Rows[i].Cells[2].Value.ToString();
richTextBox1.Text = dataGridView1.Rows[i].Cells[3].Value.ToString();
// textBox4.Text = dataGridView1.Rows[i].Cells[4].Value.ToString();
}
Datagrideview
.NET