Skip to main content

RibbonBarItemRadioButton

Namespace: Wisej.Web.Ext.RibbonBar

Assembly: Wisej.Web.Ext.RibbonBar (4.1.0.0)

Represents a radio button in a RibbonBarGroup.

public class RibbonBarItemRadioButton : RibbonBarItem

All the radio buttons in the same RibbonBarGroup are mutually exclusive.

Constructors​

Instance member RibbonBarItemRadioButton()​

Initializes a new instance of RibbonBarItemRadioButton.

Properties​

Instance member Checked​

Boolean: Returns or sets whether the RibbonBarItemRadioButton is in the checked state. (Default: False)

Value: true if the RibbonBarItemRadioButton is in the checked state; otherwise, false. The default is false.

Changing the value fires the CheckedChanged event. When the user clicks the radio button, the value is updated first, then the Click and ItemClick events are fired. When the user checks a radio button, all the other RibbonBarItemRadioButton items in the same RibbonBarGroup are unchecked, which updates their Checked property and fires their events as well. When the value is set in code, the other radio buttons are unchecked on the client but their Checked property on the server is not changed: uncheck them in code as well.

Example:

Checking a radio button in code and unchecking the others in the same group:

private void SelectView(RibbonBarItemRadioButton selected)
{
foreach (var item in selected.Parent.Items)
{
if (item is RibbonBarItemRadioButton radio)
radio.Checked = (radio == selected);
}
}

Methods​

Protected member OnCheckedChanged(e)​

Fires the CheckedChanged event.

ParameterTypeDescription
eEventArgsA EventArgs that contains the event data.

Protected member OnWebEvent(e)​

Processes the event from the client.

ParameterTypeDescription
eWisejEventArgsEvent arguments.

Protected member OnWebRender(config)​

Renders the client component.

ParameterTypeDescription
configObjectDynamic configuration object.

Events​

Instance member CheckedChanged​

EventHandler Fired when the value of the Checked property changes.

Implements​