I don't know why i can't set kendo textbox disabled when i use it with formControlName, but when i test with kendo numericTextbox then it work. here is the example code below.
I just upgrade my Angular project from version 9 to 16 and i have this problem.
I just upgrade my Angular project from version 9 to 16 and i have this problem.
@Component({
selector: 'my-app',
template: `
<form [formGroup]="test">
<kendo-label class="k-form" text="Name">
<kendo-textbox formControlName="value" [style.width.px]="200"
[disabled]="true" placeholder="Cardholder Name"></kendo-textbox>
</kendo-label>
<kendo-numerictextbox format="#" formControlName="value" placeholder="T.gian làm bài"
[disabled]="true" [min]="0"
[autoCorrect]="true"></kendo-numerictextbox>
</form>
`
})
export class AppComponent implements OnInit {
public isDisabled = true;
test = new FormGroup({
value: new FormControl('test')
})
ngOnInit() {
//I can set textbox disabled by this way
this.test.controls['value'].disable();
}
}