0

im having a problem with my database

this is my partial screenshot of the form:
http://i43.photobucket.com/albums/e355/bettybarnes/untitled.jpg


i want to have a form with the list of employee's id & names on the left side, and when i click it, it will display on the Personnel/employee tab? I don't have a code for that because i don't know how to start. if you know how this works please tell me i won't copy all the codes but i'm going to study and learn from it.. thanks in advance to those who will help me.

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Alexpap
0

since u r using datagridview on the left side, why dont u use a detailgridview inside the tab control, so when u click from the left, u get to see the details on the right. i only tried that once, but it might work, all u ve to do is connect the detailgridview with the datagridview.

0

Hey,
If i got that right, when the user clicks one row on the Employees Grid, then you want to show all the info that are related to the selected Employee. Here's a simple way to do this:

Catch the SelectedRowChanged event on the grid. Then get the value of the first cell of the grid(in your case its the EmpId) and then run an SQL Query on the db and fetch all the Employee data. When you do that, then all you have to do is to change the Textboxe's Text property with the data you want.

Hope i helped.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.