Mulitple controls in one UserControl for Settings

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
8/2/2010 7:41:27 PM
Geo
Gravatar
Total Posts 3

Mulitple controls in one UserControl for Settings

I have 2 settings for my user control that depend on each other.  One is a drop down for a category.  Whatever category is selected determines what is displayed in a second 'items' listbox.  Then the user selects one of the items in the list box.

Is this possible to do?  I was hoping I could have one Settings user control implementing ISettingControl that would contain both the category drop down as well as the items list box, however it doesn't seem possible while also implementing the ISettingControl interface.  Is there another alternative or something else I have overlooked?

Thanks

8/3/2010 8:00:47 AM
Gravatar
Total Posts 18439

Re: Mulitple controls in one UserControl for Settings

Hi,

There is example code in mojoPortal similar to what you describe. If you look in the source code under Web/Controls/CountryStateSetting.ascx you will see it has 2 dropdowns that depend on each other, the country dropdown triggers the state dropdown. The values are combined as a pipe separated string for both set and get of ISettingControl, like Country|State, so consuming code has to split it on the pipe to get the 2 individual values and combine it before setting the value on the ISettingControl.

Hope it helps,

Joe

8/3/2010 10:00:05 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Mulitple controls in one UserControl for Settings

I've wondered about this too, but just assumed it was not possible. Good to know that this capability is available!

You must sign in to post in the forums. This thread is closed to new posts.