StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Listbox event before an item is selectedExpand / Collapse
Author
Message
Posted 03/22/2007 2:38:49 PM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIP

Group: StrataFrame Users
Last Login: Yesterday @ 12:10:08 PM
Posts: 1,327, Visits: 3,471
I often use a listbox to provide navigation on a BO. I.e. the listbox displays the available records, by name. The user clicks an item in the listbox and they are navigated to that record in the BO. I have a nice component that manages it.

I've recently run into the problem that if the user is editing a record, then clicks on the list while still in the editing mode, weirdness follows. So, I'd like to check if the BO is in editing mode BEFORE the selected item of the listbox changes. This way I can prompt the user to deal with any changes made. Unfortunately, I can't seem to find an event for a listbox that occurs BEFORE the selected item is changed. Is there one? Any suggestions would be appreciated!
Post #7662
Posted 03/22/2007 7:38:30 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:50:35 PM
Posts: 4,796, Visits: 4,766
There is not an event for this so you have to handle it in the SelectedIndexChanged event.  What we generally do is take a private variable and save off the selected index....after the index is moved (and before we navigate any children records, etc.) we check to make sure that everything was okee-dokey first.  If not, we force the index of the list back to where it was and do not perform any of the navigation routines.
Post #7665
Posted 03/22/2007 8:18:30 PM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIP

Group: StrataFrame Users
Last Login: Yesterday @ 12:10:08 PM
Posts: 1,327, Visits: 3,471
Thanks. What I ended up using was the BO.Navigating event. If the user canceled, I just synch the list back to the BO and cancel the navigation. I keep your idea in mind though...never know when I'll need it
Post #7668
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 7:35am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.109. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.