sveins12
Sep 15, 2016, 3:53 AM
The method getEditor is being called but, the editor is not changing. The component returned from the first call is always being used.
Please run the example and double click in the "Editor" column on the first row. There will come a textfield. Then try to edit the second row. The editor is still a textfield, even though the getEditor method returned a checkbox.
Then run the example again and try to double click the second row first, and both rows will get checkbox-editor.
Is it possible to get around this?
Another thing is that the getEditor-method is being called 2-3 times each time the editor is being made.
@{
var x = Html.X();
var list = "textfield checkbox".Split(' ').Select(o=>new{xt=o}).ToList();
}
@(
x.GridPanelFor(list)
.Plugins(x.CellEditing())
.ColumnModel(
x.Column()
.Text("Editor")
.CustomConfig(c => c.Add(new ConfigItem("getEditor", @"
function(record){
console.log(record.data.xt);
return { xtype: record.data.xt };
}", ParameterMode.Raw)))
)
)
Please run the example and double click in the "Editor" column on the first row. There will come a textfield. Then try to edit the second row. The editor is still a textfield, even though the getEditor method returned a checkbox.
Then run the example again and try to double click the second row first, and both rows will get checkbox-editor.
Is it possible to get around this?
Another thing is that the getEditor-method is being called 2-3 times each time the editor is being made.
@{
var x = Html.X();
var list = "textfield checkbox".Split(' ').Select(o=>new{xt=o}).ToList();
}
@(
x.GridPanelFor(list)
.Plugins(x.CellEditing())
.ColumnModel(
x.Column()
.Text("Editor")
.CustomConfig(c => c.Add(new ConfigItem("getEditor", @"
function(record){
console.log(record.data.xt);
return { xtype: record.data.xt };
}", ParameterMode.Raw)))
)
)