Bound combo box

  • Thread starter Thread starter Daniel
  • Start date Start date
D

Daniel

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
 
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
 
Back
Top