File

src/ui/radio-set/smart-radio-set.component.ts

Implements

OnInit DoCheck

Metadata

Index

Properties
Methods
Inputs
Outputs
Accessors

Constructor

constructor(elementRef: ElementRef, zone: NgZone, changeDetector: ChangeDetectorRef)
Parameters :
Name Type Optional
elementRef ElementRef No
zone NgZone No
changeDetector ChangeDetectorRef No

Inputs

disabled
Type : boolean
id
Type : string
orientation
Type : string

Sets the orientation of the radio set

smart-help-url
Type : string
smartModel
Type : string
style
Type : any
value-list
Type : string[]

Outputs

smartModelChange
Type : EventEmitter<string>

Methods

clear
clear()
Returns : void
getNativeProperty
getNativeProperty(propertyName: string)
Parameters :
Name Type Optional
propertyName string No
Returns : any
Public onValueChanged
onValueChanged(event: any, key: string)
Parameters :
Name Type Optional
event any No
key string No
Returns : void
setNativeProperty
setNativeProperty(propertyName: string, value: any)
Parameters :
Name Type Optional
propertyName string No
value any No
Returns : void

Properties

visible
Type : unknown
Default value : true

Accessors

disabled
getdisabled()
setdisabled(value: boolean)
Parameters :
Name Type Optional
value boolean No
Returns : void
orientation
getorientation()

Gets the current orientation of the radio set

Returns : string
setorientation(value: string)

Sets the orientation of the radio set

Parameters :
Name Type Optional Description
value string No
  • The orientation value ('vertical' or 'horizontal')
Returns : void
ngModel
getngModel()
Returns : string
setngModel(value: string)
Parameters :
Name Type Optional
value string No
Returns : void
helpUrl
gethelpUrl()
sethelpUrl(value: string)
Parameters :
Name Type Optional
value string No
Returns : void
radioItems
getradioItems()
Returns : RadioItem[]
setradioItems(value: RadioItem[])
Parameters :
Name Type Optional
value RadioItem[] No
Returns : void
<!--
**************************************************************************
* Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") -                  *
* www.consultingwerk.com and other contributors as listed                *
* below. All Rights Reserved.                                            *
*                                                                        *
*  Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY        *
*   KIND, either express or implied.                                     *
*                                                                        *
*  Contributors:                                                         *
*                                                                        *
**************************************************************************

--------------------------------------------------------------------------
    File        : smart-radio-set.component.html
    Purpose     : Template for Smart Radio Set.
    Author(s)   : oana
    Created     : Jul 26, 2019
--------------------------------------------------------------------------
-->
<div [ngClass]="cssClasses()" [ngStyle]="style || {}" [hidden]="!visible" >
    @for (r of radioItems; track $index) {
        <div class="d-flex flex-row gap-1 align-items-center">
            <input 
                type="radio" 
                name="group"
                size="small"
                #radioInput
                [id]="'radio'+$index" 
                kendoRadioButton
                [value]="r.key" 
                [disabled]="disabled" 
                (change)="onValueChanged($event, r.key)" 
                [ngModel]="ngModel"
            />
            <kendo-label class="radio-input-label" [for]="'radio'+$index" [text]="r.value"></kendo-label>
        </div>
    }
</div>

./smart-radio-set.component.css

/**********************************************************************
 * Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") -              *
 * www.consultingwerk.com and other contributors as listed            *
 * below. All Rights Reserved.                                        *
 *                                                                    *
 *  Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY    *
 *   KIND, either express or implied.                                 *
 *                                                                    *
 *  Contributors:                                                     *
 *                                                                    *
 **********************************************************************/
/*------------------------------------------------------------------------
    File        : smart-radio-set.component.css
    Purpose     : Styles for Smart Radio Set.
    Author(s)   : oana
    Created     : Jul 26, 2019
  ----------------------------------------------------------------------*/


.horizontal {
    display: inline;
}

.k-form-field.vertical { 
    display: block !important; 
}
.k-form-field > div {
    display: flex;
    flex-direction: row;
}

input[type="radio"] {
    vertical-align: text-bottom;
    align-self: center;
}
kendo-label.radio-input-label {
    flex: 1;
}
kendo-label.radio-input-label .k-label {
    display: block !important;
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""