RadDropDownTree
This Class defines the RadDropDownList.
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
[EmbeddedSkin("DropDownTree", typeof(RadDropDownTree))]
[EmbeddedSkin("DropDownTree", "Default", typeof(RadDropDownTree))]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Lightweight, typeof(RadDropDownTree))]
[RequiredCss("Telerik.Web.UI.Skins.Common.MaterialRipple.css", RenderMode.Lightweight, typeof(RadButton))]
[RequiredScript(typeof(jQueryPlugins))]
[RequiredScript(typeof(DropDown))]
[RequiredScript(typeof(TouchScrollExtender))]
[RequiredScript(typeof(MaterialRipple))]
[ClientScriptResource("Telerik.Web.UI.RadDropDownTree", "Telerik.Web.UI.DropDownTree.RadDropDownTreeScripts.js")]
[ValidationProperty("SelectedText")]
[TelerikToolboxCategory("Data")]
[ToolboxBitmap(typeof(RadDropDownTree), "Toolbox.Icons.DropDownTree.png")]
public class RadDropDownTree : RadDataBoundControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, IPostBackDataHandler, ISkinnableControl, IControl, IFeatureGroup, IPostBackEventHandler, INamingContainer
Inheritance: objectControlWebControlBaseDataBoundControlDataBoundControlRadDataBoundControlRadDropDownTree...
Implements:
Inherited Members
Constructors
public RadDropDownTree()
Properties
Gets or sets a value indicating whether a postback to the server automatically occurs when the user changes the RadDropDownTree selection.
[Bindable(false)]
[ClientControlProperty]
[ClientPropertyName("_autoPostback")]
public bool AutoPostBack { get; set; }
Used to customize the appearance of the buttons displayed by RadDropDownTree.
[PersistenceMode(PersistenceMode.InnerProperty)]
public DropDownTreeButtonSettings ButtonSettings { get; }
Get or sets the CheckBox state of the RadDropDownTree.
[ClientControlProperty]
[ClientPropertyName("_checkBoxes")]
public virtual DropDownTreeCheckBoxes CheckBoxes { get; set; }
Gets or sets a value indicating whether checking (unchecking) a node will check (uncheck) its child nodes.
[Bindable(false)]
public bool CheckChildNodes { get; set; }
Gets or sets a value indicating whether the DropDownNodes expands on single click.
[Bindable(false)]
[ClientControlProperty]
[ClientPropertyName("_checkNodeOnClick")]
public bool CheckNodeOnClick { get; set; }
protected DropDownTreeEntryCollection Children { get; }
Gets or sets the HTML template of a DropDownNode when added on the client.
[PersistenceMode(PersistenceMode.InnerProperty)]
[Browsable(false)]
public virtual string ClientNodeTemplate { get; set; }
Gets the settings for the animation played when the dropdown closes.
[PersistenceMode(PersistenceMode.InnerProperty)]
public AnimationSettings CollapseAnimation { get; }
An AnimationSettings that represents the collapse animation.
Use the CollapseAnimation property to customize the expand animation of RadDropDownTree. You can specify the Type and Duration. To disable collapse animation effects you should set the Type to AnimationType.None.
To customize the expand animation you can use the ExpandAnimation property.
Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
public override ControlCollection Controls { get; }
The collection of child controls for the specified server control.
Overrides:
The CssClass property will now be used instead of the former Skin and will be modified in AddAttributesToRender()
protected override string CssClassFormatString { get; }
Overrides:
Gets or sets the selected culture. Localization strings will be loaded based on this value.
public CultureInfo Culture { get; set; }
The culture.
Gets the settings the data binding setting for the RadDropDownTree.
[PersistenceMode(PersistenceMode.InnerProperty)]
public List<DropDownNodeBinding> DataBindings { get; set; }
The following property is used in WebService scenarios.
Gets or sets the data field holding the unique identifier for a DropDownTreeNode.
public string DataFieldID { get; set; }
Gets or sets the data field holding the ID of the parent DropDownTreeNode.
public string DataFieldParentID { get; set; }
Gets or sets the data field holding the Text property for the currently bound DropDownTreeNode.
public string DataTextField { get; set; }
Gets or sets the data field holding the Value property for the currently bound DropDownTreeNode.
public string DataValueField { get; set; }
Gets or sets a value indicating what message will be displayed then the control is empty (no entries selected).
[Bindable(false)]
[ClientControlProperty]
[ClientPropertyName("_defaultMessage")]
public virtual string DefaultMessage { get; set; }
Gets or sets the default value of the control used for validation.
[Bindable(false)]
[ClientControlProperty]
[ClientPropertyName("_defaultValue")]
public string DefaultValue { get; set; }
Gets or sets the template for displaying all DropDownTreeNode in the current tree.
[PersistenceMode(PersistenceMode.InnerProperty)]
[Browsable(false)]
[Bindable(false)]
[TemplateContainer(typeof(RadTreeNode))]
public virtual ITemplate DropDownNodeTemplate { get; set; }
An object implementing the ITemplate interface. The default value is a null reference (Nothing in Visual Basic), which indicates that this property is not set.
Gets the DropDown settings.
[PersistenceMode(PersistenceMode.InnerProperty)]
public DropDownSettings DropDownSettings { get; }
Gets a reference to the embedded tree
public RadTreeView EmbeddedTree { get; }
RadTreeView control is integrated in the RadDropDownTree.
When set to true enables support for WAI-ARIA
[ClientControlProperty]
[ClientPropertyName("_enableAriaSupport")]
public bool EnableAriaSupport { get; set; }
Determines whether the Direction Detection is enabled or not.
[Bindable(false)]
[ClientControlProperty]
[ClientPropertyName("_enableDirectionDetection")]
public bool EnableDirectionDetection { get; set; }
Gets or sets a value indicating whether RadDropDownTree should HTML encode the text of the entries.
[ClientControlProperty]
[ClientPropertyName("_enableEntryTextHtmlEncoding")]
public bool EnableEntryTextHtmlEncoding { get; set; }
true if the text should be encoded; otherwise, false. The default value is
false.
Gets or sets a value indicating whether the control filtering is enabled.
[Bindable(false)]
[ClientControlProperty]
[ClientPropertyName("_enableFiltering")]
public bool EnableFiltering { get; set; }
Determines whether the Screen Boundaries Detection is enabled or not.
[Bindable(false)]
[ClientControlProperty]
[ClientPropertyName("_enableScreenBoundaryDetection")]
public bool EnableScreenBoundaryDetection { get; set; }
Gets the RadDropDownTree entries collection.
[Browsable(false)]
[PersistenceMode(PersistenceMode.InnerProperty)]
public DropDownTreeEntryCollection Entries { get; }
Gets or sets a value indicating the delimiter between entries.
[Bindable(false)]
[ClientControlProperty]
[ClientPropertyName("_entriesDelimiter")]
public string EntriesDelimiter { get; set; }
Gets the settings for the animation played when the dropdown opens.
[PersistenceMode(PersistenceMode.InnerProperty)]
public AnimationSettings ExpandAnimation { get; }
An AnimationSettings that represents the expand animation.
Use the ExpandAnimation property to customize the expand animation of RadDropDownTree. You can specify the Type and Duration. To disable expand animation effects you should set the Type to AnimationType.None.
To customize the collapse animation you can use the CollapseAnimation property.
Gets or sets a value indicating whether the DropDownNodes expands on single click.
[Bindable(false)]
[ClientControlProperty]
[ClientPropertyName("_expandNodeOnSingleClick")]
public bool ExpandNodeOnSingleClick { get; set; }
Used to customize filtering of the RadDropDownTree.
[PersistenceMode(PersistenceMode.InnerProperty)]
public DropDownTreeFilterSettings FilterSettings { get; }
Get a footer of RadDropDownTree.
[Browsable(false)]
public WebControl Footer { get; }
Gets or sets the ITemplate that defines the RadDropDownTree footer template.
[TemplateContainer(typeof(RadDropDownTree))]
[PersistenceMode(PersistenceMode.InnerProperty)]
[Browsable(false)]
[Bindable(false)]
public virtual ITemplate FooterTemplate { get; set; }
The footer template.
Gets or sets a value indicating the delimiter in FullPath text mode.
[Bindable(false)]
[ClientControlProperty]
[ClientPropertyName("_fullPathDelimiter")]
public string FullPathDelimiter { get; set; }
Get a header of RadDropDownTree.
[Browsable(false)]
public WebControl Header { get; }
Gets or sets the ITemplate that defines the RadDropDownTree header template.
[TemplateContainer(typeof(RadDropDownTree))]
[PersistenceMode(PersistenceMode.InnerProperty)]
[Browsable(false)]
[Bindable(false)]
public virtual ITemplate HeaderTemplate { get; set; }
The header template.
Gets the localization.
[PersistenceMode(PersistenceMode.InnerProperty)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public DropDownTreeButtons Localization { get; }
The localization.
Gets or sets a value indicating where RadDropDownTree will look for its .resx localization files.
public string LocalizationPath { get; set; }
The localization path.
Gets or sets the ODataDataSource used for data binding.
public override string ODataDataSourceID { get; set; }
Overrides:
Gets or sets the name of the JavaScript function called on clear button clicked
[ClientControlEvent]
[ClientPropertyName("clearButtonClicked")]
public string OnClientClearButtonClicked { get; set; }
Gets or sets the name of the JavaScript function called on clear button clicking
[ClientControlEvent]
[ClientPropertyName("clearButtonClicking")]
public string OnClientClearButtonClicking { get; set; }
The client-side event that is fired after the dropdown of the DropDownTree is closed.
[Bindable(false)]
[ClientControlEvent]
[ClientPropertyName("dropDownClosed")]
public string OnClientDropDownClosed { get; set; }
The event handler receives two parameter: the instance of the DropDownTree client-side object and event args. The event can not be cancelled
The client-side event that is fired before the dropdown of the DropDownTree is closed.
[Bindable(false)]
[ClientControlEvent]
[ClientPropertyName("dropDownClosing")]
public string OnClientDropDownClosing { get; set; }
The event handler receives two parameter: the instance of the DropDownTree client-side object and event args. The event can be cancelled - simply set args.set_cancel to true args.set_cancel(true); from the event handler and the DropDownTree dropdown will not be closed.
The client-side event that is fired after the dropdown of the DropDownTree is opened.
[Bindable(false)]
[ClientControlEvent]
[ClientPropertyName("dropDownOpened")]
public string OnClientDropDownOpened { get; set; }
The event handler receives two parameter: the instance of the DropDownTree client-side object and event args. The event cannot be cancelled.
The client-side event that is fired before the dropdown of the DropDownTree is opened.
[Bindable(false)]
[ClientControlEvent]
[ClientPropertyName("dropDownOpening")]
public string OnClientDropDownOpening { get; set; }
The event handler receives two parameter: the instance of the DropDownTree client-side object and event args. The event can be cancelled - simply set args.set_cancel to true args.set_cancel(true); from the event handler and the DropDownTree dropdown will not be opened.
Gets or sets the name of the JavaScript function called after an entry has been added
[ClientControlEvent]
[ClientPropertyName("entryAdded")]
public string OnClientEntryAdded { get; set; }
Gets or sets the name of the JavaScript function called when an entry is about to be added
[Bindable(false)]
[ClientControlEvent]
[ClientPropertyName("entryAdding")]
public string OnClientEntryAdding { get; set; }
Gets or sets the name of the JavaScript function called after an entry has been removed
[ClientControlEvent]
[ClientPropertyName("entryRemoved")]
public string OnClientEntryRemoved { get; set; }
Gets or sets the name of the JavaScript function called when an entry is about to be removed
[ClientControlEvent]
[ClientPropertyName("entryRemoving")]
public string OnClientEntryRemoving { get; set; }
Gets or sets a value indicating the client-side event handler that is called after the RadDropDownTree client-side object is initialized.
[ClientControlEvent]
[ClientPropertyName("load")]
public string OnClientLoad { get; set; }
A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.
If specified, the OnClienLoad client-side event handler is called after the DropDownTree is fully initialized on the client.
A single parameter - the dropdowntree client object - is passed to the handler.
This event cannot be cancelled.
Gets the entries text with the appropriate delimiter.
[Browsable(false)]
[Bindable(true, BindingDirection.TwoWay)]
[Themeable(false)]
public string SelectedText { get; set; }
Gets the entries values in comma separated list.
[Browsable(false)]
[Bindable(true, BindingDirection.TwoWay)]
[Themeable(false)]
public string SelectedValue { get; set; }
protected override bool SupportsRenderingMode { get; }
Overrides:
protected override HtmlTextWriterTag TagKey { get; }
Overrides:
Gets or sets a value indicating whether the entry should show the its full path in the entry area.
[Bindable(false)]
[ClientControlProperty]
[ClientPropertyName("_textMode")]
public DropDownTreeTextMode TextMode { get; set; }
Gets the unique, hierarchically qualified identifier for the server control.
[ClientControlProperty]
[ClientPropertyName("_uniqueId")]
public override string UniqueID { get; }
The fully qualified identifier for the server control.
Overrides:
Gets the settings for the web service used to populate nodes when ExpandMode set to WebService.
[PersistenceMode(PersistenceMode.InnerProperty)]
public WebServiceSettings WebServiceSettings { get; }
Methods
protected override void AddAttributesToRender(HtmlTextWriter writer)
Overrides:
protected override void CreateChildControls()
Overrides:
protected DropDownTreeEntryCollection CreateChildItemCollection()
protected virtual void CreateControlRenderer<T>()
Bind the RadDropDownTree control.
public override void DataBind()
Overrides:
protected override void DescribeComponent(IScriptDescriptor descriptor)
Overrides:
Expands all of the DropDownNodes.
public void ExpandAllDropDownNodes()
Executed when post data is loaded from the request
protected override bool LoadPostData(string postDataKey, NameValueCollection postCollection)
Overrides:
protected virtual void OnEntriesAdded(DropDownTreeEntriesEventArgs e)
protected virtual void OnEntriesRemoved(DropDownTreeEntriesEventArgs e)
protected virtual void OnEntryAdded(DropDownTreeEntryEventArgs e)
protected virtual void OnEntryRemoved(DropDownTreeEntryEventArgs e)
protected virtual void OnNodeDataBound(DropDownTreeNodeDataBoundEventArguments e)
protected override void RenderContents(HtmlTextWriter writer)
Overrides:
Synchronize the nodes and the entries collection.
public void SyncEmbeddedTree()
The method is used in cases when some nodes are checked manually.
protected override void TrackViewState()
Overrides:
Events
Occurs after entires are added
public event DropDownTreeEntriesEventHandler EntriesAdded
Occurs after entires are removed
public event DropDownTreeEntriesEventHandler EntriesRemoved
Occurs when an entry is added
public event DropDownTreeEntryEventHandler EntryAdded
Occurs when an entry is removed
public event DropDownTreeEntryEventHandler EntryRemoved
public event DropDownTreeNodeDataBoundEventHandler NodeDataBound