472,809 Members | 3,461 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,809 software developers and data experts.

combo boxes in datagrids

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

Oct 4 '06 #1
2 1550
What am I missing?
Better controls!

www.infragistics.com
Ausclad wrote:
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
Oct 4 '06 #2


"Izzy" wrote:
>
What am I missing?

Better controls!

www.infragistics.com

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??
Oct 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: FZ | last post by:
Hi Gang, I was wondering if a generous person might be able to walk me through what I believe is a pretty simple task. I actually have significant Access experience, but I haven't done it in...
0
by: Krisa | last post by:
Hello all, I just discovered something (stop me if you've heard this before....) that was causing me a significant performance hit when opening a form with subforms. To speed up loading the...
0
by: Tom | last post by:
I have some very strange issues with combo boxes on a tab control. Here's the scenario: I have a Windows Forms form that has a tab control on it, with two (2) tabs. Tab 2 happens to have a number...
7
by: Ausclad | last post by:
Ok, ill try again..... It seems fairly simple. I have two combo boxes in a datagrid. The datagrid is bound to a a table in a dataset. The two combo boxes are bound to a single data table...
4
by: Dave | last post by:
I wasn't sure how to search for previous posts about this, it felt real specific. Ok so here's the database & problem: I have 4 combo boxes: cboServer, cboPolicy, cboDB, and cboApplication. ...
6
by: Dave | last post by:
I want to put the information that the user selects in my combo boxes into a subform that lies on the same form as the combo boxes. Thanks for your help already, Dave
1
by: Dave | last post by:
Hello all, First I'd like to apologize...This post was meant to be put in my previous post, but I tried many times without success to reply within my previous post. Now here goes... I have a...
2
by: Dave | last post by:
I have 3 tables of information feeding into 4 combo boxes on my main form (DR Form). I have as many list boxes (acting as text boxes) as there are fields in each one of the 3 tables. Once...
2
by: someshbakliwal | last post by:
Hi, I have created some autopopulating combo boxes on my HTML page (script- Javascript). so these combo boxes are autopopulated with choices made in previous combo boxes. The problem I am facing is...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.