Propagating changes to a LookupEdit


Author
Message
Kirk M Sherhart
Kirk M Sherhart
StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)
Group: Forum Members
Posts: 41, Visits: 259
If I have a DevExpress LookupEdit bound to a BBS for its lookup values, will changes to the BBS's underlying BO (adds, delete, edits) be automatically propagated to the LookupEdit? For example, if a record is deleted from the BO, the next time the LookupEdit is selected, the value would not be presented for selection.



If not, what's the best way to capture and propagate the changes?

Replies
Kirk M Sherhart
Kirk M Sherhart
StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)
Group: Forum Members
Posts: 41, Visits: 259
Hi all



I'm sorry to use such a loaded word as "domain." Let me try again.



Suppose I have a single SF application with two open windows. One window uses a shared PeopleBO to perform normal edits (add/deletes/edits) on PeopleBO itself. The second window uses the PeopleBO as a population source (via a BBS) to a DevExpress LookupEdit



Will adds/edits/deletes done to PeopleBO be automatically propagated through the BBS to the population values of the LookupEdit, or must some other refresh be done?



A simple scenario might be: the user corrects a misspelled name using the PeopleBO window. Switching to the second window, the user edits some other data using a PeopleBO-populated LookupEdit. Will the corrected name appear in the LookupEdit's popup list?



Sorry for any confusion.







Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
If you use a shared data table then you should get exactly what you are looking for then. This is one of the purposes of a shared data table. Otherwise a simple requery could be called when the form is activated. But you might try the shared data table first to see if that is what you are looking for.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Kirk,



In this case, you'll want to go with Peter's suggestion and have an event fire when a property is changed. There is a setting in the Business Object Properties were you setup events related to property access/edits. I believe you'd want to have events fire when properties have changed. You can either have a single event for all properties or an event for each property. (See the Configuring Business Objects help topic).



Once you have that setup, you can then subscribe to that event on the form with the LookupEdit. Within the event handler, you'd just requery the LookupEdit to refill it (or however you fill the lookup values with that control).
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Kirk,



I have the same kind of scenario as yours but I don't use DevExpress, I have SF comboboxes in other forms, and what I do is in the DropDown to force a Combobox.Requery() to make sure the data is updated.



I know this may not be the most effective way to handle that, but if the lookup BO does not have many records it may be acceptable to you. On the other hand Trent suggestion to have some sort of mechanism to see if the data has changed via a SP looks interesting.

The approach that we generally use if automatic updates are necessary to the client cache, is to create a threaded timer (System.Threading.Timer) that calls a sproc on the server every X number of seconds and SUMs up all of the row versions and then we will do a compute of the local data table to see if these numbers match. If so, the cache is up to date, otherwise a query is necessary to get any missing records.



Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search