Dec 21, 2014, 5:03 PM
[OPEN] [#774] Component Column Editor add row not working properly
Hi I do bellow code for add row to grid panel on button click.after click button rows added but TAB key to navigate one cell to another not working properly.add 2-3 rows by click on button.and goto 1st cell of first row and start pressing TAB KEY .please run sample code and assist me how I solve this.
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Index</title>
<script type="text/javascript">
var addPlant = function () {
var r = Ext.create('pr', {
}),
grid = App.GridPanel;
grid.store.insert(0, r);
// grid.editingPlugin.startEditByPosition({ row: 0, column: 0 });
};
</script>
</head>
<body>
<div>
@Html.X().ResourceManager()
@(Html.X().GridPanel()
.Title("ComponentColumn Editor")
.ID("GridPanel")
.TopBarItem(Html.X().Button().Text("Add").Listeners(le => { le.Click.Fn = "addPlant"; }).Icon(Icon.Add))
.Width(600)
.Height(300)
.Store(Html.X().Store()
.Model(Html.X().Model()
.Name("pr")
.Fields(
new ModelField("IntField", ModelFieldType.Int),
new ModelField("ComboField", ModelFieldType.Int),
new ModelField("TextField", ModelFieldType.String),
new ModelField("DateField", ModelFieldType.Date)
)
)
)
.ColumnModel(
Html.X().ComponentColumn()
.Editor(true)
.DataIndex("IntField")
.Flex(1)
.Text("Integer")
.Component(Html.X().NumberField()),
Html.X().ComponentColumn()
.Editor(true)
.DataIndex("ComboField")
.Flex(1)
.Text("ComboBox")
.Component(Html.X().ComboBox()
.Items(
new ListItem("Item 1", 1),
new ListItem("Item 2", 2)
)
),
Html.X().ComponentColumn()
.Editor(true)
.DataIndex("TextField")
.Flex(1)
.Text("Text")
.Component(Html.X().TextField()),
Html.X().ComponentColumn()
.Editor(true)
.DataIndex("DateField")
.Flex(1)
.Text("Date")
.Component(Html.X().DateField())
)
)
</div>
</body>
</html>
Last edited by Daniil; Mar 27, 2015 at 9:44 PM.
Reason: [OPEN] [#774]