IllegalStateException: Cannot change column editable status while the editor is active

in dataGrid,
a action can open a dialog,
doubleClick the column in dataGrid,the colum is edited,
then click mouse right show actions,click the action open o dialog,
when close the dialog,alert a IllegalStateException: Cannot change column editable status while the editor is active

so should i close the editor before open the dialog?and how close it

Hi,

Could you please attach a demo project in which the problem is reproduced?

Regards,
Gleb

CUBA Application - Google Chrome 2018_7_6 9_04_39.rar (3.7 MB)

this is video,please uncompress

it’s just a datagrid table and a action,
the action while open a edit window,
when the table is in edit state as video,
then ,right click to open action at this ,
after action window close ,the action refresh datasource and set the cloumn of datagrid visible is true or false

public void setheader() {

  // 设置标题
  HeaderRow headerRow = colorGroupDataGrid.getHeaderRow(0);
  
  headerRow.getCell("colorGroupName")
  		.setHtml("<div style=\"text-align: center;font-size: 12px;\">色  组/色  号</div>");
  // 移除空的列
  if (null == style.getSize1() || "".equals(style.getSize1())) {
  	colorGroupDataGrid.getColumn("qty1").setVisible(false);
  } else {
  	colorGroupDataGrid.getColumn("qty1").setVisible(true);
  	headerRow.getCell("qty1").setText(style.getSize1());
  }
  if (null == style.getSize2() || "".equals(style.getSize2())) {
  	colorGroupDataGrid.getColumn("qty2").setVisible(false);
  } else {
  	colorGroupDataGrid.getColumn("qty2").setVisible(true);
  	headerRow.getCell("qty2").setText(style.getSize2());
  }
  if (null == style.getSize3() || "".equals(style.getSize3())) {
  	colorGroupDataGrid.getColumn("qty3").setVisible(false);
  } else {
  	colorGroupDataGrid.getColumn("qty3").setVisible(true);
  	headerRow.getCell("qty3").setText(style.getSize3());
  }
  if (null == style.getSize4() || "".equals(style.getSize4())) {
  	colorGroupDataGrid.getColumn("qty4").setVisible(false);
  } else {
  	colorGroupDataGrid.getColumn("qty4").setVisible(true);
  	headerRow.getCell("qty4").setText(style.getSize4());
  }
  if (null == style.getSize5() || "".equals(style.getSize5())) {
  	colorGroupDataGrid.getColumn("qty5").setVisible(false);
  } else {
  	colorGroupDataGrid.getColumn("qty5").setVisible(true);
  	headerRow.getCell("qty5").setText(style.getSize5());
  }
  if (null == style.getSize6() || "".equals(style.getSize6())) {
  	colorGroupDataGrid.getColumn("qty6").setVisible(false);
  } else {
  	colorGroupDataGrid.getColumn("qty6").setVisible(true);
  	headerRow.getCell("qty6").setText(style.getSize6());
  }
  if (null == style.getSize7() || "".equals(style.getSize7())) {
  	colorGroupDataGrid.getColumn("qty7").setVisible(false);
  } else {
  	colorGroupDataGrid.getColumn("qty7").setVisible(true);
  	headerRow.getCell("qty7").setText(style.getSize7());
  }
  if (null == style.getSize8() || "".equals(style.getSize8())) {
  	colorGroupDataGrid.getColumn("qty8").setVisible(false);
  } else {
  	colorGroupDataGrid.getColumn("qty8").setVisible(true);
  	headerRow.getCell("qty8").setText(style.getSize8());
  }
  if (null == style.getSize9() || "".equals(style.getSize9())) {
  	colorGroupDataGrid.getColumn("qty9").setVisible(false);
  } else {
  	colorGroupDataGrid.getColumn("qty9").setVisible(true);
  	headerRow.getCell("qty9").setText(style.getSize9());
  }
  if (null == style.getSize10() || "".equals(style.getSize10())) {
  	colorGroupDataGrid.getColumn("qty10").setVisible(false);
  } else {
  	colorGroupDataGrid.getColumn("qty10").setVisible(true);
  	headerRow.getCell("qty10").setText(style.getSize10());
  }
  if (null == style.getSize11() || "".equals(style.getSize11())) {
  	colorGroupDataGrid.getColumn("qty11").setVisible(false);
  } else {
  	colorGroupDataGrid.getColumn("qty11").setVisible(true);
  	headerRow.getCell("qty11").setText(style.getSize11());
  }
  if (null == style.getSize12() || "".equals(style.getSize12())) {
  	colorGroupDataGrid.getColumn("qty12").setVisible(false);
  } else {
  	colorGroupDataGrid.getColumn("qty12").setVisible(true);
  	headerRow.getCell("qty12").setText(style.getSize12());
  }
  if (null == style.getSize13() || "".equals(style.getSize13())) {
  	colorGroupDataGrid.getColumn("qty13").setVisible(false);
  } else {
  	colorGroupDataGrid.getColumn("qty13").setVisible(true);
  	headerRow.getCell("qty13").setText(style.getSize13());
  }
  if (null == style.getSize14() || "".equals(style.getSize14())) {
  	colorGroupDataGrid.getColumn("qty14").setVisible(false);
  } else {
  	colorGroupDataGrid.getColumn("qty14").setVisible(true);
  	headerRow.getCell("qty14").setText(style.getSize14());
  }
  if (null == style.getSize15() || "".equals(style.getSize15())) {
  	colorGroupDataGrid.getColumn("qty15").setVisible(false);
  } else {
  	colorGroupDataGrid.getColumn("qty15").setVisible(true);
  	headerRow.getCell("qty15").setText(style.getSize15());
  }
  headerRow.getCell("sumqty").setHtml("<div style=\"text-align: center;font-size: 12px;\">合计</div>");
  for (int i = 1; i <= 15; i++) {
  	if(colorGroupDataGrid.getColumn("qty"+i).isVisible()) {
  	headerRow.getCell("qty" + i).setStyleName("center-size12");
  	}
  }

}

colorGroupDataGrid.getColumn("qty1").setVisible(false);

if the column “qty1” is editing and qty1 visible is true,
then i set visible is false when qty1 is editing, it will throw the message: IllegalStateException: Cannot change column editable status while the editor is active

may be ,i should close the editor or commit it before i set visible is false

you can reproduce in this

Hi,

That’s not a bug, you have to close an editor before changing the column editable state.

Regards,
Gleb