简体   繁体   English

根据条件基础网格启用或禁用每行可编辑的行

[英]enable or disable row editable per row based on condition infragistic grid

I need to make a row editable based on grid data.我需要根据网格数据使行可编辑。 Some rows will be editable and some will not.有些行将是可编辑的,有些则不能。 I tried cellEditExit/cellEdit event and tried to cancel the event but didn't work.我尝试了 cellEditExit/cellEdit 事件并尝试取消该事件但没有奏效。

Using (rowEditEnter) and (cellEditEnter) is the correct approach.使用 (rowEditEnter) 和 (cellEditEnter) 是正确的方法。 I am surprised that it didn't worked:我很惊讶它没有奏效:

<igx-grid [data]="data" height="550px" primaryKey="ProductID"
        [rowEditable]="true"
        (rowEditEnter)="rowEditEnter($event)"
        (cellEditEnter)="cellEditEnter($event)"
...
public rowEditEnter(evt) {
    evt.cancel = true;
}
public cellEditEnter(evt) {
    evt.cancel = true;
}

You can use this sample and topic as a reference and understand the event cancelation sequence .您可以将此示例和主题用作参考并了解事件取消顺序

Which version of the product are you using?您使用的是哪个版本的产品? My recommendation is to use the latest version of 11.1.7我的建议是使用最新版本的 11.1.7

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 基于按钮单击的角度垫表启用/禁用行 - Angular mat table enable/disable row based on button click 根据 PrimeNG TurboTable 或 TreeTable 的行内容禁用/启用选择 - Disable/Enable selection based on row content of PrimeNG TurboTable or TreeTable ag-grid:在按键时禁用单元格编辑,并通过编辑按钮以编程方式启用行编辑(角度2) - ag-grid : Disable cell edit on key press and pro grammatically enable row edit with edit button (Angular 2) 暂时禁用 AG Grid (Angular) 中的行选择 - Temporarily disable row selection in AG Grid (Angular) ag-grid:根据同一行其他单元格中的内容禁用单元格 - ag-grid: Disable cells based on content in other cells on the same row 如何根据剑道网格中的特定列条件更改行的颜色以获得角度 - How to change color of row based on particular column condition in kendo grid for angular Ag Grid + 如何使特定行中的特定列可动态编辑或不可编辑 - Ag Grid + How to Make a particular column from a particular row editable or Non Editable Dynamically 可编辑行的Primeng RowIndex - Primeng RowIndex of editable row 如何根据 angularJs 中的条件突出显示表格行? - How to highlight table row based on condition in angularJs? 根据角度 6 中的条件隐藏相同的行值? - Hide same row value based on condition in angular 6?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM