Bound combo box

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel

    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


  • Bryan

    #2
    Re: Bound combo box

    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" <dspruce@qmasto rNOSPAM.com.au> wrote in message
    news:u9cb1bSvDH A.2508@TK2MSFTN GP12.phx.gbl...[color=blue]
    > 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[/color]
    click[color=blue]
    > 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[/color]
    the[color=blue]
    > 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[/color]
    time[color=blue]
    > 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[/color]
    node[color=blue]
    > the combo box displays correctly (i.e if there is no value for this node[/color]
    for[color=blue]
    > that combo box then it will not display a value) so it's only ever the[/color]
    first[color=blue]
    > node selected that has a problem.
    >
    > Thank you for any assistance.
    >
    > Daniel
    >
    >[/color]


    Comment

    Working...