When i select on grid checkbox to true , i want to flip the readonly tofalse for the dropdownWhen checkbox not selected, the readonly shd be true for dropdownisSelected is true/falsereadonly="!data.isSelected"<e-column textAlign='Center' width=90><ng-template #template let-data><div><ejs-checkbox id="check" name="check" [(ngModel)]="data.isSelected" label="Default"></ejs-checkbox></div></ng-template></e-column><e-column [allowEditing]='false' field='name' headerText='Name' textAlign='Left' width=100></e-column><e-column [allowEditing]='false' field='jobTitle' headerText='Title' textAlign='Center' width=100></e-column><e-column headerText='Permission' textAlign='Left' width=90><ng-template #template let-data><div><ejs-dropdownlist name="ddPod" id="ddPod" [(ngModel)]="data.permissionId" readonly="!data.isSelected"[fields]='portfolioAccessFields' placeholder='Select Permission'[dataSource]='dataPortfolioAccessTypes'></ejs-dropdownlist></div></ng-template></e-column>
|
App.component.ts
chboxChange(args) {
let currentTr = parentsUntil(args.event.target, "e-row");
let dropObj = currentTr.querySelector(".e-control.e-dropdownlist")[
"ej2_instances"
][0];
dropObj.readonly = !args.checked;
} |
I need to do a required validation for dropdown when the checkbox is checked
Hey Team,
Given Example Work Fine at Row Level but I need to checked all row checkbox after click on header leve
Before proceeding to the solution, please ensure your requirement is to add a check box and dropdown to the header and when you click on the header checkbox you want to change the read-only mode of the dropdown in the header? Or is your requirement is to change the read-only mode of all the dropdowns in the grids content when you check or uncheck the checkbox in the header?
Please get back to us with the details requested so that we may be able to proceed further.