472,371 Members | 1,512 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,371 software developers and data experts.

Bound combo box

Hi there,

I've been having a problem with binding to a combo box. I'm binding to a
third party dataset table view. When on the selected tab page and you click
a certain tree node it will fire a display event to display the relevant
details for that Tree node.

The first time that you click on a node the combo's datasource is set to the
table view and the index is set to -1. The index is then updated depending
if the selected node has a value set. The problem is that on this first time
it seems to ignore the selected index visually in the form (ie it always
will display the first entry in the combo box) but by stepping through the
code the selected index is actaully set to -1. When clicking on another node
the combo box displays correctly (i.e if there is no value for this node for
that combo box then it will not display a value) so it's only ever the first
node selected that has a problem.

Thank you for any assistance.

Daniel
Nov 15 '05 #1
1 1701
This sounds to me like a postback issue. It's almost like your page is
rendered and then the code that changes the index kicks off. This would
cause the code to show the index change while the page would not reflect
the -1 index change until the second postback.

I'd have to see your code to be more specific but I'd guess that's what is
happening.

Bryan

"Daniel" <ds*****@qmastorNOSPAM.com.au> wrote in message
news:u9**************@TK2MSFTNGP12.phx.gbl...
Hi there,

I've been having a problem with binding to a combo box. I'm binding to a
third party dataset table view. When on the selected tab page and you click a certain tree node it will fire a display event to display the relevant
details for that Tree node.

The first time that you click on a node the combo's datasource is set to the table view and the index is set to -1. The index is then updated depending
if the selected node has a value set. The problem is that on this first time it seems to ignore the selected index visually in the form (ie it always
will display the first entry in the combo box) but by stepping through the
code the selected index is actaully set to -1. When clicking on another node the combo box displays correctly (i.e if there is no value for this node for that combo box then it will not display a value) so it's only ever the first node selected that has a problem.

Thank you for any assistance.

Daniel

Nov 15 '05 #2

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

Similar topics

0
by: Paul Edwards | last post by:
I am writing in c# with Visual Studio 2003. I am creating a form that shows one record from a Dataset that is populated with only one record from SQL Server 2000. I am using bound controls, both...
2
by: Daniel Tan | last post by:
Hi, how can i obtain the value of combobox multiple bound column data ? Eg, if i select combo box, it has more than one field, name and age and id listed. Pls advise, thanks. Regards, Daniel
2
by: Ed via AccessMonster.com | last post by:
Hi all, What I am trying to do is get the value of the second column of a bound combo box in vba. example: Combo box: column 1-ID column 2-SIGN_CODE 1 R-1.gif 2 ...
3
by: Cindi Simonson | last post by:
Hi, I have a form with a combo box containing 4 columns of data. The form also contains 3 print buttons where the goal is to open 3 different reports according to the value in one of the...
4
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
4
by: Evan | last post by:
I have a data bound combo box. The combo box displays several items (status code descriptions). After the combo box is bound, I want to set the combo box so that the "Draft" status is displayed by...
1
by: Bill | last post by:
Problem: Combo box data disappears from view when a requery is done See "Background" below for details on tables, forms & controls On a form, I want to use the setting of bound combo box C1...
9
by: Vmusic | last post by:
Hi, I'm using MS Access 2002. I have a form with a combo box built from a query that returns one column, and that one column is the bound column. How do you use VBA to programmatically change...
5
by: Hetal | last post by:
Hi there.. I am a VB6 developer so kinda trying to figure how to work with VB.NET. I have a scenario where i have a DataSet bound to a combo box, and i would like to read a row from the DataSet...
0
by: Hetal | last post by:
Hi there.. I am a VB6 developer so kinda trying to figure how to work with VB.NET. I have a scenario where i have a DataSet bound to a combo box, and i would like to read a row from the DataSet...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

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.