|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
combo boxes in datagridsI have an existing Access application that needs to be converted to .net I am restricted to use the existing database design. One of the areas is a timesheet data entry screen. The existing Access app writes to a table (tblTimesheetHours). In the data entry screen, the fields, like employee name, job, etc are bound to combo boxes that lookup values in other tables. So far I can replicate most of this in .nets datagrid. The problem I have is that the existing app lets them select the employees by either name, or by payroll id. Selecting one combo box, automatically updates the other combo box. In my datagrid I have a combobox for employee payroll, which is bound to the value from tblTimesheetHours…and with a datasource from a lookup dataset I have populated…..eg With Me.DataGridViewcboEmpCode .DisplayMember = "EmpCode" .ValueMember = "EmpCode" .DataSource = dsLookups.Tables("EmplsCodeLookup") End With I also have the name field bound like so With Me.DataGridViewcboName .DisplayMember = "Name" .ValueMember = "Name" .DataSource = dsLookups.Tables("EmplsCodeLookup") End With Basically, if the user updates either the name or the payroll code, I need the value in the other combo box to move to the same record. There doesnt seem to be anyway to update the selected item in a combo box within a datagrid. That is, on a cell change event, if I want to update the payroll combo box to be the same as the employee name combo box, there is no selectedindex property I can update.... What am I missing? thanks > What am I missing? Better controls!www.infragistics.com Ausclad wrote: Show quoteHide quote > How Would you implement this? > > I have an existing Access application that needs to be converted to .net > > I am restricted to use the existing database design. > > One of the areas is a timesheet data entry screen. > > The existing Access app writes to a table (tblTimesheetHours). In the data > entry screen, the fields, like employee name, job, etc are bound to combo > boxes that lookup values in other tables. > > So far I can replicate most of this in .nets datagrid. > > The problem I have is that the existing app lets them select the employees > by either name, or by payroll id. Selecting one combo box, automatically > updates the other combo box. > > In my datagrid I have a combobox for employee payroll, which is bound to the > value from tblTimesheetHours...and with a datasource from a lookup dataset I > have populated.....eg > > With Me.DataGridViewcboEmpCode > .DisplayMember = "EmpCode" > .ValueMember = "EmpCode" > .DataSource = dsLookups.Tables("EmplsCodeLookup") > End With > > I also have the name field bound like so > > With Me.DataGridViewcboName > .DisplayMember = "Name" > .ValueMember = "Name" > .DataSource = dsLookups.Tables("EmplsCodeLookup") > End With > > Basically, if the user updates either the name or the payroll code, I need > the value in the other combo box to move to the same record. > > There doesnt seem to be anyway to update the selected item in a combo box > within a datagrid. That is, on a cell change event, if I want to update the > payroll combo box to be the same as the employee name combo box, there is no > selectedindex property I can update.... > > What am I missing? > > thanks
Is this forum here to help people or just for Vendors to spam there goods?????
Has anyone got a solution that doesnt involve buying expensive add ons??
.NET 2 recommended books?
Sending email with attachments writing commands to command prompt in VB.NET Data Set to Excel ? vb.net serial IO problem Open folders to process files automatically Datetimepicker - just getting the data part ComboBox.Items.Clear() How hard would this be? How to convert code snipped from VB6 to Visual Studio 2005/VB (VB7?) |
|||||||||||||||||||||||