1. Add datagridview from toolbox into windowsform. 2. Now populate datagridview by your required data. I already have populated my datagridview. 3. Now add fields like lables and textboxes alongside datagridview like shown below: 4. Now write the following code in the click event of datagridview. CODE: private void dataGridView1_Click(object sender, EventArgs e) { try { for (int i = 0; i < dataGridView1.Columns.Count; i++) { textBox5.Text = this.dataGridView1.CurrentRow.Cells[0].Value.ToString(); textBox6.Text = this.dataGridView1.CurrentRow.Cells[1].Va...
1. Open new excel file. 2. Click on data tab. 3. Click on From Other Sources and then on From Microsoft Querry . 4. Select <New Data Source> and click OK button. 5. Assign any name to your data that you want to import. 6. Select driver for the type of your database, in this case you select Microsoft Access dBase Driver (*.dbf,*.ndx,*.mdx). 7. Now click Connect button and on next dialog box uncheck Use Curren Directory. 8. Now click Select Directory and find your desired DBF file folder , in this case my file is located in E:\ so I select E drive and click ok. 9. Now folder is selected click OK again. 10. Now Select your desired file by click on dropdown list and click OK. 11. Click OK again, Querry wizard appears, now sele...