grid.store.add() doesnt render Command Column

  1. #1

    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:

    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?
  2. #2
    Hi

    Please see the following sample
    http://mvc.ext.net/GridPanel_Commands/Row_Command/

    If execute the following code inside console then all fine
    App.Store1.add({});
    Please provide runable sample

Similar Threads

  1. [CLOSED] How to wrapping grid command column?
    By macroe in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 24, 2014, 1:22 PM
  2. [CLOSED] Chrome doesnt render XTemplate in grid properly
    By Z in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 25, 2013, 3:38 AM
  3. [CLOSED] Slow Grid Render on Large Data with Command Column
    By amitpareek in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Apr 08, 2013, 2:41 PM
  4. Replies: 9
    Last Post: Feb 14, 2013, 2:55 PM
  5. command column messing up grid column
    By wp_joju in forum 1.x Help
    Replies: 2
    Last Post: Dec 08, 2010, 6:40 AM

Tags for this Thread

Posting Permissions