"Refreshing" a dropdownlist bound to a sqldatasource


Author
Message
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
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).
franka
franka
StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)
Group: Forum Members
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!!

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