I have a datagrid connected to a msql-server database. User can enter there worktime information there. The columns are e.g. Starttime
, Endttime
, Date
, Projectname
etc.
Usually I use a combobox with a link to a specific table to fill the datagrid. E.g. There is a Table Project in my sql database with the field Project_ID
, Project_Name
. The Project_ID
field is also in the Table Time Collector so I set the datasource, member and valuemember and get what I want.
For the start and end time columns I wanna have a dropdown with time in 15 minute intervals and for the Date
column I wanna have a defaulted date of "Now"
and a datetimepicker. But I have absolutley no idea how to implement that.
I could set up a table with all the times give it an id and bind it but that looks to me like cracking a nut with a sledgehammer.
It would be great if one of you could help me with it.
I am using visual studio 12 express.