This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.
/// <summary>/// Gets or sets the first dropdown that will be displayed./// </summary>public string FirstDDValue { get; set; }/// <summary>/// Gets or sets the second dropdown that will be displayed./// </summary>public string SecondDDValue { get; set; }<telerik:RadComboBox ID="MainDropDown" CssClass="sfTxt" runat="server"></telerik:RadComboBox><hr /><telerik:RadComboBox ID="DependantDropDown" CssClass="sfTxt" runat="server"></telerik:RadComboBox>/// <summary>/// Gets the control that is bound to the MainDropDown property/// </summary>protected RadComboBox MainDropDown{ get { return this.Container.GetControl<RadComboBox>("MainDropDown", true); }}/// <summary>/// Gets the control that is bound to the DependantDropDown property/// </summary>protected RadComboBox DependantDropDown{ get { return this.Container.GetControl<RadComboBox>("DependantDropDown", true); }}/// <summary>/// Gets a collection of script descriptors that represent ECMAScript (JavaScript) client components./// </summary>public override System.Collections.Generic.IEnumerable<System.Web.UI.ScriptDescriptor> GetScriptDescriptors(){ var scriptDescriptors = new List<ScriptDescriptor>(base.GetScriptDescriptors()); var descriptor = (ScriptControlDescriptor)scriptDescriptors.Last(); descriptor.AddElementProperty("message", this.Message.ClientID); descriptor.AddComponentProperty("dropdown", this.MainDropDown.ClientID); descriptor.AddComponentProperty("dropdownDependant", this.DependantDropDown.ClientID); return scriptDescriptors;}var ItemsList = { "1": ["1.1", "1.2", "1.3"], "2": ["2.1", "2.2", "2.3"], "3": ["3.1", "3.2", "3.3"], "4": ["4.1", "4.2", "4.3"],}initialize: function () { /* Here you can attach to events or do other initialization */ SitefinityWebApp.RelatedComboBoxes.Designer.RelatedComboBoxesDesigner.callBaseMethod(this, 'initialize'); this._MainDropdownChangedDelegate = Function.createDelegate(this, this._mainDropDownChangedHandler); this.get_dropdown().add_selectedIndexChanged(this._MainDropdownChangedDelegate);},Subscribe to get all the news, info and tutorials you need to build better business apps and sites