public virtual void SetGroup() { string groupName = this.GroupName.IsEmpty() ? this.ClientID + "_Group" : this.GroupName; foreach (Radio item in this.Items) { RadioColumn rCol = item as RadioColumn; if (rCol != null) { foreach (Component comp in rCol.Items) { Radio radio = comp as Radio; if (radio != null && (radio.Name.IsEmpty() || this.AutomaticGrouping)) { radio.SuspendScripting(); radio.Name = groupName; radio.ResumeScripting(); } } } else { if (item.Name.IsEmpty() || this.AutomaticGrouping) { item.SuspendScripting(); item.Name = groupName; item.ResumeScripting(); } } } }
protected override void AfterItemAdd(Observable item) { base.AfterItemAdd(item); Radio radio = (Radio)item; if (!this.DesignMode && this.AutomaticGrouping) { string groupName = this.GroupName.IsEmpty() ? this.ClientID + "_Group" : this.GroupName; RadioColumn rCol = radio as RadioColumn; if (rCol != null) { foreach (Component comp in rCol.Items) { Radio radioItem = comp as Radio; if (radioItem != null && (radioItem.Name.IsEmpty() || this.AutomaticGrouping)) { radioItem.SuspendScripting(); radioItem.Name = groupName; radioItem.ResumeScripting(); } } } else { if (radio.Name.IsEmpty() || this.AutomaticGrouping) { radio.SuspendScripting(); radio.Name = groupName; radio.ResumeScripting(); } } } }
/// <summary> /// /// </summary> public RadioColumn.Builder RadioColumn(RadioColumn component) { return(new RadioColumn.Builder(component)); }