New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

RadButtonList class

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
[ValidationProperty("SelectedItem")]
[RequiredScript(typeof(jQueryPlugins))]
[ClientScriptResource("Telerik.Web.UI.RadButtonList", "Telerik.Web.UI.Common.ButtonList.RadButtonListScripts.js")]
public abstract class RadButtonList : RadDataBoundControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, ISkinnableControl, IControl, IFeatureGroup, IPostBackDataHandler, INamingContainer

Inheritance: objectControlWebControlBaseDataBoundControlDataBoundControlRadDataBoundControlRadButtonList...

Derived Classes: RadCheckBoxListRadRadioButtonList

Implements: IAttributeAccessorIComponentIControlIControlBuilderAccessorIControlDesignerAccessorIControlResolverIDataBindingsAccessorIDisposableIExpressionsAccessorIFeatureGroupINamingContainerIParserAccessorIPostBackDataHandlerIScriptControlISkinnableControlIUrlResolutionService...

Inherited Members DataBoundControl.OnCreatingModelDataSource(CreatingModelDataSourceEventArgs)DataBoundControl.CreateDataSourceSelectArguments()DataBoundControl.GetData()DataBoundControl.GetDataSource()DataBoundControl.MarkAsDataBound()DataBoundControl.OnDataPropertyChanged()DataBoundControl.OnDataSourceViewChanged(object, EventArgs)DataBoundControl.OnLoad(EventArgs)DataBoundControl.OnPagePreLoad(object, EventArgs)DataBoundControl.PerformSelect()DataBoundControl.ValidateDataSource(object)DataBoundControl.DataMemberDataBoundControl.IsUsingModelBindersDataBoundControl.ItemTypeDataBoundControl.SelectMethodDataBoundControl.DataSourceIDDataBoundControl.DataSourceObjectDataBoundControl.SelectArgumentsDataBoundControl.CreatingModelDataSourceDataBoundControl.CallingDataMethodsBaseDataBoundControl.ConfirmInitState()BaseDataBoundControl.DataBind()BaseDataBoundControl.EnsureDataBound()BaseDataBoundControl.OnDataBound(EventArgs)BaseDataBoundControl.OnInit(EventArgs)BaseDataBoundControl.OnPreRender(EventArgs)BaseDataBoundControl.DataSourceBaseDataBoundControl.InitializedBaseDataBoundControl.IsBoundUsingDataSourceIDBaseDataBoundControl.IsDataBindingAutomaticBaseDataBoundControl.SupportsDisabledAttributeBaseDataBoundControl.RequiresDataBindingBaseDataBoundControl.DataBoundWebControl.ApplyStyle(Style)WebControl.CopyBaseAttributes(WebControl)WebControl.CreateControlStyle()WebControl.MergeStyle(Style)WebControl.Render(HtmlTextWriter)WebControl.RenderBeginTag(HtmlTextWriter)WebControl.RenderEndTag(HtmlTextWriter)WebControl.AccessKeyWebControl.AttributesWebControl.BackColorWebControl.BorderColorWebControl.BorderWidthWebControl.BorderStyleWebControl.ControlStyleWebControl.ControlStyleCreatedWebControl.CssClassWebControl.DisabledCssClassWebControl.StyleWebControl.EnabledWebControl.EnableThemingWebControl.FontWebControl.ForeColorWebControl.HasAttributesWebControl.IsEnabledWebControl.SkinIDWebControl.TabIndexWebControl.TagNameWebControl.ToolTipControl.ResolveAdapter()Control.HasEvents()Control.GetRouteUrl(object)Control.GetRouteUrl(string, object)Control.GetRouteUrl(RouteValueDictionary)Control.GetRouteUrl(string, RouteValueDictionary)Control.GetUniqueIDRelativeTo(Control)Control.ApplyStyleSheetSkin(Page)Control.OnDataBinding(EventArgs)Control.DataBind(bool)Control.DataBindChildren()Control.AddParsedSubObject(object)Control.EnsureID()Control.ClearChildState()Control.ClearChildControlState()Control.ClearChildViewState()Control.ClearEffectiveClientIDMode()Control.ClearCachedClientID()Control.Focus()Control.LoadControlState(object)Control.MapPathSecure(string)Control.OpenFile(string)Control.BuildProfileTree(string, bool)Control.SaveControlState()Control.RenderChildren(HtmlTextWriter)Control.RenderControl(HtmlTextWriter)Control.RenderControl(HtmlTextWriter, ControlAdapter)Control.OnUnload(EventArgs)Control.Dispose()Control.RaiseBubbleEvent(object, EventArgs)Control.OnBubbleEvent(object, EventArgs)Control.AddedControl(Control, int)Control.CreateControlCollection()Control.ResolveUrl(string)Control.ResolveClientUrl(string)Control.FindControl(string)Control.FindControl(string, int)Control.GetDesignModeState()Control.HasControls()Control.IsLiteralContent()Control.EnsureChildControls()Control.RemovedControl(Control)Control.SetDesignModeState(IDictionary)Control.SetRenderMethodDelegate(RenderMethod)Control.ClientIDModeControl.ClientIDControl.ClientIDSeparatorControl.ContextControl.AdapterControl.DesignModeControl.EventsControl.IDControl.IsChildControlStateClearedControl.EnableViewStateControl.ViewStateModeControl.IsViewStateEnabledControl.NamingContainerControl.IdSeparatorControl.LoadViewStateByIDControl.PageControl.RenderingCompatibilityControl.TemplateControlControl.ParentControl.TemplateSourceDirectoryControl.AppRelativeTemplateSourceDirectoryControl.SiteControl.VisibleControl.UniqueIDControl.HasChildViewStateControl.ControlsControl.ValidateRequestModeControl.ViewStateControl.ViewStateIgnoresCaseControl.ChildControlsCreatedControl.IsTrackingViewStateControl.DisposedControl.DataBindingControl.InitControl.LoadControl.PreRenderControl.Unloadobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

C#
protected RadButtonList()

Fields

C#
protected bool isSelectedIndexChanged

Properties

Gets or sets a value that indicates whether list items are cleared before data binding.

C#
public bool AppendDataBoundItems { get; set; }

Gets the object that controls the Wai-Aria settings applied on the control's element.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public WaiAriaSettings AriaSettings { get; }

Specifies if change of the selected item should postback.

C#
public bool AutoPostBack { get; set; }

Gets or sets a value indicating whether validation is performed when the selected item is changed.

C#
public bool CausesValidation { get; set; }

Defines the client events handlers.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public ButtonListClientEvents ClientEvents { get; }

Gets or sets the number of columns to display in the control when the layout is Flow.

C#
public int Columns { get; set; }

The CssClass property will now be used instead of the former Skin and will be modified in AddAttributesToRender()

C#
protected override string CssClassFormatString { get; }

Overrides: RadDataBoundControl.CssClassFormatString

Example:
C#
protected override string CssClassFormatString
{
       get
       {
           return "RadDock RadDock_{0} rdWTitle rdWFooter";
       }
}

Defines the data binding configuration of the control

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public ButtonListDataBinding DataBindings { get; }

Gets or sets the direction in which the items within the group are displayed.

C#
public ButtonListDirection Direction { get; set; }

Gets or sets a value indicating whether support for WAI-ARIA is enabled.

C#
[ClientControlProperty]
[ClientPropertyName("enableAriaSupport")]
public bool EnableAriaSupport { get; set; }

Gets or sets the value, indicating whether to render the link to the embedded base stylesheet of the control or not. This control features no skins, so this property must be set to false.

C#
[Browsable(false)]
public override bool EnableEmbeddedBaseStylesheet { get; }

Overrides: RadDataBoundControl.EnableEmbeddedBaseStylesheet

Gets or sets the value, indicating whether to render links to the embedded skins or not. This control features no skins, so this property must be set to false.

C#
[Browsable(false)]
public override bool EnableEmbeddedSkins { get; set; }

Overrides: RadDataBoundControl.EnableEmbeddedSkins

Gets or sets the height of the control.

C#
[ClientControlProperty]
[ClientPropertyName("height")]
public override Unit Height { get; set; }

Overrides: RadDataBoundControl.Height

Gets the number of list items in the control.

C#
public int ItemCount { get; }

Gets the collection of items in the list control. An item has Text, Value, Selected and Enabled properties.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public ButtonListItemCollection Items { get; }
Property Value:

A collection of list control items.

Used to define keyboard shortcut to focus the first list item.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public KeyboardNavigationSettings KeyboardNavigationSettings { get; }

Gets or sets the layout in which the items are rendered. Possible values are Flow, OrderedList, UnorderedList. OrderedList and UnorderedList do not support Horizontal Direction and Columns.

C#
public ButtonListLayout Layout { get; set; }

Gets or sets the lowest ordinal index of the selected items in the control.

C#
[Browsable(false)]
[ClientControlProperty]
[ClientPropertyName("selectedIndex")]
public int SelectedIndex { get; set; }

Gets the value of the selected item in the list control, or selects the item in the list control that contains the specified value.

C#
[Browsable(false)]
public string SelectedValue { get; set; }
C#
public virtual string SmartPasteDescription { get; set; }
C#
protected override HtmlTextWriterTag TagKey { get; }

Overrides: WebControl.TagKey

Gets or sets the group of controls for which an item from the list causes validation when it posts back to the server.

C#
[ClientControlProperty]
[ClientPropertyName("validationGroup")]
public string ValidationGroup { get; set; }

Gets or sets the width of the control.

C#
[ClientControlProperty]
[ClientPropertyName("width")]
public override Unit Width { get; set; }

Overrides: RadDataBoundControl.Width

Methods

C#
protected override void AddAttributesToRender(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: RadDataBoundControl.AddAttributesToRender(HtmlTextWriter)

Code moved into this method from OnPreRender to make sure it executed when the framework skips OnPreRender() for some reason

C#
protected override void ControlPreRender()

Overrides: RadDataBoundControl.ControlPreRender()

C#
protected abstract CheckableButton CreateCheckableButton()
Returns:

CheckableButton

C#
protected override void CreateChildControls()

Overrides: Control.CreateChildControls()

C#
protected override IRenderer CreateControlRenderer()
Returns:

IRenderer

Overrides: RadDataBoundControl.CreateControlRenderer()

C#
protected override void DescribeComponent(IScriptDescriptor descriptor)
Parameters:descriptorIScriptDescriptor

Overrides: RadDataBoundControl.DescribeComponent(IScriptDescriptor)

C#
protected ButtonListItem GetItem(string value)
Parameters:valuestringReturns:

ButtonListItem

Executed when post data is loaded from the request

C#
protected override bool LoadPostData(string postDataKey, NameValueCollection postCollection)
Parameters:postDataKeystringpostCollectionNameValueCollectionReturns:

bool

Overrides: RadDataBoundControl.LoadPostData(string, NameValueCollection)

C#
protected override void LoadViewState(object savedState)
Parameters:savedStateobject

Overrides: DataBoundControl.LoadViewState(object)

Raises the ItemCreated event of the control.

C#
protected virtual void OnItemCreated(ButtonListEventArgs e)
Parameters:eButtonListEventArgs

An EventArgs that contains the event data.

Raises the ItemDataBound event of the control.

C#
protected virtual void OnItemDataBound(ButtonListEventArgs e)
Parameters:eButtonListEventArgs

An EventArgs that contains the event data.

Raises the SelectedIndexChanged event of the control.

C#
protected virtual void OnSelectedIndexChanged(EventArgs e)
Parameters:eEventArgs

An EventArgs that contains the event data.

C#
protected override void PerformDataBinding(IEnumerable data)
Parameters:dataIEnumerable

Overrides: DataBoundControl.PerformDataBinding(IEnumerable)

Invokes the OnSelectedIndexChanged method, when the SelectedIndex property of the control has changed.

C#
protected override void RaisePostDataChangedEvent()

Overrides: RadDataBoundControl.RaisePostDataChangedEvent()

C#
protected override void RenderContents(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: RadDataBoundControl.RenderContents(HtmlTextWriter)

C#
protected override object SaveViewState()
Returns:

object

Overrides: DataBoundControl.SaveViewState()

C#
protected virtual void SetCheckableButtonProperties(CheckableButton checkableButton, ButtonListItem item)
Parameters:checkableButtonCheckableButtonitemButtonListItem
C#
protected virtual void SetSelectedIndex(int value)
Parameters:valueint
C#
protected virtual void SetSelectedItem(ButtonListItem item)
Parameters:itemButtonListItem
C#
protected virtual void SetSelectedValue(string value)
Parameters:valuestring
C#
protected override void TrackViewState()

Overrides: DataBoundControl.TrackViewState()

Events

Adds or removes an event handler method from the ItemCreated event. The event is fired when an item is created on the server.

C#
public event EventHandler<ButtonListEventArgs> ItemCreated

Adds or removes an event handler method from the ItemDataBound event. The event is fired when an item is data bound on the server.

C#
public event EventHandler<ButtonListEventArgs> ItemDataBound

Adds or removes an event handler method from the SelectedIndexChanged event. The event is fired when the selected item changes between posts to the server.

C#
public event EventHandler SelectedIndexChanged