Hello Marko,
Greetings from Syncfusion support.
To set the validation class names in dropdownlist, you can manually add the class names into the inner element of the dropdown. Here is the code snippet for your reference.
//on button click
public onClick(args: any): void {
let listElt: Element = this.listObj.element.querySelector(".e-input-group");
listElt.classList.remove('e-success')
listElt.classList.remove('e-warning');
listElt.classList.remove('e-error');
if (args.target.id == 'btn1') {
listElt.classList.add('e-success')
}
else if (args.target.id == 'btn2') {
listElt.classList.add('e-warning');
}
else if (args.target.id == 'btn3') {
listElt.classList.add('e-error');
}
} |
Please refer to the below sample,
Please get back to us if you require any further assistance.
Thanks,
Christo