Subject | Re: [IBO] Refreshing ComboBox |
---|---|
Author | Helen Borrie |
Post date | 2001-08-15T14:53:05Z |
At 09:51 AM 15-08-01 -0400, you wrote:
I agree with Luc, if you want a combo box whose list has to stay in sync with the other dataset, you need the data-aware list that tib_lookupcombo provides. You *could* write a LoadComboBox routine that clears and loads the combobox list both at FormCreate and whenever a row from dataset A gets posted but this is expensive and loses you the benefit of watching Bookmarks in dataset A and using them to refresh just the changed row in the list of a lookupcombo.
As was suggested, the dataset for the lookupcombo would need to be inside a READ COMMITTED transaction for it to pick up the refreshes from dataset A.
rgds
Helen
Have you thought about
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>Dear List:Paul,
>
>This is in the bang-head-here category.
>
>Environment Win95/Delphi3/IBO3.6.Di
>
>I have two forms, the first one edits TABLE-A, it has a transaction
>item on it, that has AutoCommit set to TRUE.
>
>The second form edits TABLE-B, it has a TIB_ComboBox on it, that lets
>you pick a record from TABLE-A, however if I add a new record to
>TABLE-A, it doesn't appear on the second form, until I exit and
>restart the application. The dataset here, does a refresh when the
>form is activated, I thought that would do it, but it doesn't seem to
>work.
>
>So what do I need to do to make the combo-box refresh it's data?
I agree with Luc, if you want a combo box whose list has to stay in sync with the other dataset, you need the data-aware list that tib_lookupcombo provides. You *could* write a LoadComboBox routine that clears and loads the combobox list both at FormCreate and whenever a row from dataset A gets posted but this is expensive and loses you the benefit of watching Bookmarks in dataset A and using them to refresh just the changed row in the list of a lookupcombo.
As was suggested, the dataset for the lookupcombo would need to be inside a READ COMMITTED transaction for it to pick up the refreshes from dataset A.
rgds
Helen
Have you thought about
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________