I am trying to implement a data entry for a timesheet.
I'm using VB.net 2005.
Using a datagridview, I want to have the datagridview bound to a table.
Lets say the table has timesheet data for lots of employees for different
days.
An employee will can be working on a job. Each job has 1 to many cost codes
assocaited with it.
when entering hours, you need to enter
Employee Code | Job Number | Cost Code | Hours
Is it possible to have the datagridview cells cell type = text boxes when
you view, but then changed to combo boxes when you edit them?
So for example, so say I go into a record for "John Smith", The Job field
now changes to a combo box, and lists all the jobs he can do. On selecting a
job, the cost code box now becomes a combo box and only shows cost codes
associated with that job.?
I know that I could just have these fields as combo boxes and have them
bound to a datatable with all values. However, for Costcodes we are looking
at 13000 records. For any given job there is usually only 10.
I therefore dont want to have the costcode combo box having to be bound to a
datatable with thousands of records.
i did work out a way where I made a dataview on the datatable, then filtered
the dataview based on the job selection. This works, but i would think be
putting a large overhead on the user pc (having to store all these records in
memory).
(by the way i have simplified the example, there are other fields where the
same problem occurs).
So basically what I want is just for the row currently editing, change some
fields to combo boxes, dynamically fill and bind them, then turn back to text
boxes on leaving.
Is this possible?
cheers