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



"Refreshing" a dropdownlist bound to a...Expand / Collapse
Author
Message
Posted 12/13/2005 2:45:31 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 01/02/2008 1:46:14 PM
Posts: 22, Visits: 35
This is probably something simple but I can't seem to find the right method(s).  I have a StrataFrame dropdownlist that is bound to a sqldatasource.  The dropdownlist is being used to select a customer (by name).  When the customer is selected, a business object is populated which is bound to a series of textboxes on the same page.  If the user changes the customer's name and saves it, I want to "refresh" the dropdownlist with the new name.  I'm assuming the sqldatasource first needs to be repopulated and then rebound to the dropdownlist.  What methods on each control need to be invoked?

Thanks!!

Post #314
Posted 12/13/2005 4:00:46 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 11:24:42 AM
Posts: 2,686, Visits: 1,889
The Requery() method on the list controls (ComboBox, ListBox, CheckedListBox, ListView, etc) is exposed for this exact purpose. Say you have two combo boxes... the child combo box is populated according to the selected value of the parent. In the SelectedIndexChanged event (or where ever else you may need to repopulate it) of the parent, put the call to Requery() on the child. The child will then behave as if it had never been populated and it will clear itself and repopulate.

Just so you know... the Requery event takes a parameter array. The parameters accepted by the list are the same parameters you need to pass to the method you selected in the PopulationDataSourceSettings for the ComboBox. If you don't pass any parameters, then you can supply them through the ListPopulating event of the ComboBox (which you're probably already doing).


www.bungie.net
Post #315
« 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 12:50pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.047. 12 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.