tabcontrol.selectab(tabpage) causes my bound controls to not work correctly.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nev
    Contributor
    • Oct 2007
    • 251

    tabcontrol.selectab(tabpage) causes my bound controls to not work correctly.

    i have a tabcontrol with 2 tabs.
    in my datasources pane i have a table with 4 columns -- col1, col2, col3 & col4. now i drag n drop col1 in tab1 & col2 in tab2 as bound textboxes. i place col3 & col4 on my form.

    when i run the program, everything's cool. i can navigate the records and all textboxes display the correct data. i click the tabs and everything's fine.

    now what i'll do is to programatically display a tab based on the value of col3.

    tabcontrol.sele cttab(tabpage)

    here goes the problem. when i navigate the records, col4 does not display the correct record. sometimes its correct sometimes not. when i comment the code for selecting the tab, everythings cool again. it seems like selecting the tab thru code causes major turbulence in the bindings.

    please enlighten me.
  • nev
    Contributor
    • Oct 2007
    • 251

    #2
    i tried it out again this time i notice that the problem only happens once for the first record i want to display. the next navigations show the correct data.

    Comment

    • nev
      Contributor
      • Oct 2007
      • 251

      #3
      now i get it. when i do this in form load

      .selecttab(0)
      .selecttab(1)

      everything works cool. so what does this mean? what does selecttab do? does it initialize the tab along with the control bindings in it? what is a better way to initialize like the one above. as of the moment the code above is the one i'm using until i get a better solution.

      i tried...

      1. refresh
      2. initializelifet imeservice
      3. update

      ...but these doesn't work.

      so does this mean that if i have 5 tabs i'll be doing...

      .selecttab(0)
      .selecttab(1)
      .selecttab(2)
      .selecttab(3)
      .selecttab(4)

      ...in my form load painfully?

      Comment

      Working...