Hello, I try disable button or activate.
Example this line:
headerText: "Accion",
commands: [
{ type: "carrito", buttonOptions: { contentType: "imageonly", prefixIcon: "fa fa-shopping-cart", click: "OnClick" } },],
I don't know if exist a function.
Thanks!!
|
queryCellInfo: function(args) {
if ((args.cell.classList.contains("e-unboundcell") && args.data as any).ShipCountry === "Brazil") {
(args.cell.querySelector("button[title='Edit']") as any).ej2_instances[0].disabled = true;
args.cell.querySelector("button[title='Edit']").classList.add("e-disabled");
(args.cell.querySelector("button[title='Delete']") as any).ej2_instances[0].disabled = true;
args.cell.querySelector("button[title='Delete']").classList.add("e-disabled");
}
}
|
Hello, thanks for you answer.
I see the example. My idea is this, I have 2 grid, the first grid display the products and 1 button example this:
headerText: "Accion",
commands: [
{ type: "carrito", buttonOptions: { contentType: "imageonly", prefixIcon: "fa fa-shopping-cart", click: "OnClick" } },],
When I click the button, I pass the info another grid (2) and later disable the button from first grid.
The secound grid when receive the info, also can remove the row, if is remove the rows, I want enable the button selected from first grid.
function OnClick(args) {
console.log(args);
args.cell.querySelector("button[role='button']").classList.add("e-disabled");
I put thism there show me error,
"args.cell." not support.
I use the Ej1 or JS1