Question Idea on how to gice a drilldown capability

peterc

Member
Joined
Jan 5, 2016
Messages
16
Programming Experience
1-3
Hi all again,

I have a system I am designing, that is a project / job management system.

So I have a job list, and a job by client, and a jobs by owner, and a jobs by vehicle, and a jobs by employee form, which all display the job details in a datagridview.

What I am trying to figure out is the best way to handle a "drilldown" capability. So the user will click on the a job in the datagridview, and this will drilldown to the job details window, which will show all the pertinent information in relation to the job. The job details form has approx 10 tab pages on it.

What is the best way to parse the job number to the job details form, and then on return to the previous form, refreshing the datagridview.

Any thoughts and ideas would be greatly appreciated.
 
There's no parsing to be done. If it's done properly then you will have bound your job list to a BindingSource and bound that to the grid. When you open the details form, you get the current record from the Current property of the BindingSource. You cast it as the appropriate type, which will be DataRowView if you bound a DataTable, and then get the ID from the appropriate property of column of that record. You pass it to the details form when you create it and call ShowDialog. Because ShowDialog blocks until the dialogue closes, you can refresh the job grid right after that call, although I'm not sure exactly why you'd need to do that.
 
Back
Top