C# Windows Form

DataGridView Selected Row Data to Textboxes in C#

In this example, I’ll show How to display selected row from Datagridview into Textbox using C# Windows Form Application.

Step 1: Add controls to Form. (dataGridView, label*4, textBox*4)

Step 2: First, Go the properties windows and change the Name property of textBoxes controls.

Step 3: Go to the properties window by clicking on the dataGridView control. Change the SelectionMode to FullRowSelect property of the dataGridView control.

Step 4: Add code in CellEnter  event of DataGridView Control.

 

Step 5: Add code in Form_Load event.

All Code:

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.