Aug 07, 2014, 7:12 PM
grid.store.add() doesnt render Command Column
Hello everbody,
I tryed add a row to the grid using grid.store.add() method. It doesn't works partially because the command columns from my grid doesn't render. I using Ext.Net.MVC with Razor.
My code:
Someone help me?
I tryed add a row to the grid using grid.store.add() method. It doesn't works partially because the command columns from my grid doesn't render. I using Ext.Net.MVC with Razor.
My code:
Html.X().GridPanel()
.Title("LISTA")
.Icon(Icon.Table)
.Layout(LayoutType.Fit)
.ID("grdGrupo")
.Store(Html.X().Store()
.PageSize(10)
.Model(Html.X().Model().IDProperty("Codigo")
.Fields(
Html.X().ModelField().Name("Nome").Type(ModelFieldType.String),
Html.X().ModelField().Name("Status").Type(ModelFieldType.String)
)
))
.ColumnModel(
Html.X().CommandColumn()
.Width(70)
.Commands(
Html.X().GridCommand()
.CommandName("Alterar")
.Icon(Icon.NoteEdit),
Html.X().GridCommand()
.CommandName("AtivarInativar")
.Icon(Icon.Delete)
)
.Listeners(l => l.Command.Handler = "commandGrupo(command, record)"),
Html.X().Column().Text("Nome").DataIndex("Nome").Flex(6),
Html.X().Column().Text("Status").DataIndex("Status").Flex(4).Renderer("prepareStatus")
)
.Plugins(Html.X().FilterHeader())
.BottomBar(
Html.X().PagingToolbar()
.HideRefresh(true)
)
Javascript:App.grdGrupo.store.add(response);
App.grdGrupo.store.commitChanges();
Someone help me?