[CLOSED] MVC gridpanel paging and summary

Page 1 of 3 123 LastLast
  1. #1

    [CLOSED] MVC gridpanel paging and summary

    Hi all,
    mine is a Asp.Net Mvc application.
    I have gridpanel to which paging is applied.
    How i can add summary in BottomBar?
    My store is

    .Store(
                   Html.X().StoreForModel().Control(s =>
                    {
                        s.AutoSync = true;
                        s.Proxy.Add(
                            new RestProxy
                                {
                                    AppendAction = false,
                                    Reader = {
                                    new JsonReader {
                                        Root = "data",
                                        MessageProperty = "message"
                                    }
                                },
                                    API =
                                    {
                                        Read = Url.Action("Read"),
                                        Update = Url.Action("Update"),
                                        Create = Url.Action("Create"),
                                        Destroy = Url.Action("Destroy")
                                    },
                                    Writer = {
                                    new JsonWriter
                                    {
                                        AllowSingle = true
                                    }
                                }
                                }
                        );
                        s.Listeners.Write.Fn = "onWrite";
                    })
                )
    And I use Html.X().ColumnFor

    Thanks in advance
    Marco
    Last edited by Daniil; May 22, 2014 at 1:18 PM. Reason: [CLOSED]
  2. #2
    Hi Marco,

    Please read #3:
    http://forums.ext.net/showthread.php?10205
  3. #3
    Hi Daniil,
    sorry for bad formatting.

    Thank you for fixing it.

    Now, can you please help me about the question?
    Thanks in advance.
    Marco
  4. #4
    Please clarify do you a summary like that?
    https://examples2.ext.net/#/GridPane...Grid_TotalRow/
  5. #5
    Quote Originally Posted by Daniil View Post
    Please clarify do you a summary like that?
    https://examples2.ext.net/#/GridPane...Grid_TotalRow/
    ok thanks,
    RemoteRoot like in GroupingSummary it isn't available?

    I have another problem, if I enable summary I lost formatting for the column

    My columns are like

    Html.X().ColumnFor(Model, m => m.FF01)
    .ToBuilder<Column.Builder>()
    .Flex(1)
    .Align(Alignment.Right)
    .SummaryRenderer(new Renderer() { Fn = "Ext.util.Format.numberRenderer('0.000/i')" })
    .SummaryType(SummaryType.Sum)
    .Renderer(RendererFormat.Number, new string[] { "'0.000/i'" })
    .ID("mese_10")
    if I comment

    Html.X().Summary()
    .Dock(SummaryDock.Bottom)
    column are formatting correclty
    Attached Thumbnails Click image for larger version. 

Name:	img.png 
Views:	30 
Size:	4.0 KB 
ID:	10681  
  6. #6
    Quote Originally Posted by marco.morreale View Post
    RemoteRoot like in GroupingSummary it isn't available?
    For Grid_TotalRow example? No, there is not such the functionality. I think it is possible to implement manually.

    Quote Originally Posted by marco.morreale View Post
    I have another problem, if I enable summary I lost formatting for the column
    I cannot reproduce. Please provide a full test case.
  7. #7
    Hi Daniil,
    actually, I meant a summary like that:

    https://examples2.ext.net/#/GridPanel/Plugins/Summary/
  8. #8
    A Summary's RemoteRoot doesn't work.
    https://github.com/extnet/Ext.NET/issues/295

    Here is a possible solution:
    http://forums.ext.net/showthread.php...l=1#post113009
  9. #9
    Hi Daniil,
    I reproduced the problem with summary and formatting together.

    The formatting fails if I set a locked column.

    Html.X().GridPanel()
    
            .ID("grid1")
    
                .Title("Analisi e Simulazione")
    
                .Frame(true)
    
                .Store(
    
                    Html.X().StoreForModel().Control(s =>
    
                    {
    
                        s.AutoSync = true;
    
                        s.Proxy.Add(
    
                            new RestProxy
    
                                {
    
                                    AppendAction = true,
    
                                    Reader = 
    
                                                                                                                                 {
    
                                                                                                                                                 new JsonReader {
    
                                                                                                                                                                 Root = "data.dataInTable.data",
    
                                                                                                                                                                 MessageProperty = "message",
    
                                                                                                                                                                 TotalProperty="data.dataInTable.total"
    
                                                                                                                                                 }
    
                                                                                                                                 },
    
                                    API =
    
                                    {
    
                                        Read = Url.Action("Read"),
    
                                        Update = Url.Action("Update"),
    
                                        Create = Url.Action("Create"),
    
                                        Destroy = Url.Action("Destroy")
    
                                    },
    
                                    Writer =
    
                                    {
    
                                                                                                                                                 new JsonWriter
    
                                                                                                                                                 {
    
                                                                                                                                                                 AllowSingle = true
    
                                                                                                                                                 }
    
                                                                                                                                 }
    
                                }
    
                        );
    
                        s.Listeners.BeforeSync.Handler = "Ext.net.Mask.show({ el: App.grid1.body, msg: 'Saving'});";
    
                        s.Listeners.Write.Handler = "Ext.net.Mask.hide()";
    
                        s.Listeners.Exception.Handler = "Ext.net.Mask.hide()";
    
                        s.Listeners.Write.Fn = "onWrite";
    
                    })
    
                    .PageSize(20)
    
                )
    
                .ColumnModel(
    
                            Html.X().ColumnFor(Model, m => m.CodDivisione)
    
                            .ToBuilder<Column.Builder>()
    
                            .Locked(true)
    
                            .Width(60).Hidden(true),
    
     
    
                            Html.X().Column()
    
                            .Text("Ore Contrattuali")
    
                            .Columns(
    
                            Html.X().ColumnFor(Model, m => m.FullYear)
    
                            .ToBuilder<Column.Builder>().Align(Alignment.Right)
    
                            .Flex(1)
    
                            .ID("FullYear")
    
                            .Renderer(RendererFormat.Number, new string[] { "'0.000/i'" })
    
                            .SummaryRenderer(new Renderer() { Fn = "Ext.util.Format.numberRenderer('0.000/i')" }),
    
     
    
                            Html.X().ColumnFor(Model, m => m.OreRes)
    
                            .ToBuilder<Column.Builder>()
    
                            .Renderer(RendererFormat.Number, new string[] { "'0.000/i'" })
    
                            .Align(Alignment.Right).Flex(1)
    
                            .SummaryType(SummaryType.Sum)
    
                            .SummaryRenderer(new Renderer() { Fn = "Ext.util.Format.numberRenderer('0.000/i')" })
    
                            ),
    
     
    
                            Html.X().Column()
    
                            .Text("Ferie + ROL")
    
                            .Columns(
    
                            Html.X().ColumnFor(Model, m => m.SaldoFeriePermessi)
    
                            .ToBuilder<Column.Builder>().Renderer(RendererFormat.Number, new string[] { "'0.000/i'" }).Align(Alignment.Right).Flex(1),//.SummaryType(SummaryType.Sum),
    
                                                                                                  )
    
                )
    
                .SelectionModel(
    
                    Html.X().CellSelectionModel()
    
                )
    
                .BottomBar(
    
                            Html.X().PagingToolbar()
    
                                .DisplayInfo(true)
    
                                .DisplayMsg("Lista Centri di Costo {0} - {1} of {2}")
    
                                .EmptyMsg("No plants to display")
    
                        )
    
                .Plugins(
    
                    Html.X().CellEditing().ClicksToEdit(1)
    
                )
    
                .Features(
    
                        Html.X().GridFilters()
    
                        .Local(false)
    
                        .Filters(
    
                                Html.X().StringFilter().DataIndex("DesCdc"),
    
                                Html.X().StringFilter().DataIndex("CapoArea"),
    
                                Html.X().StringFilter().DataIndex("Dsm"),
    
                                Html.X().StringFilter().DataIndex("Cdc")
    
                        ),
    
                        Html.X().Summary()
    
                            .Dock(SummaryDock.Bottom)
    
                        )
    
        )
  10. #10
    Could you, please, make it runnable? Ideally, we should copy, paste and run a test case without any changes from our side.
Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 1
    Last Post: Oct 14, 2013, 1:15 PM
  2. [CLOSED] group summary does not support paging?
    By tobros in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Oct 11, 2013, 12:29 AM
  3. [CLOSED] gridpanel with local paging. Maintain checkbox selection while paging
    By PriceRightHTML5team in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 20, 2013, 10:20 AM
  4. [CLOSED] Groupping Summary with Paging Toolbar
    By tdracz in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 12, 2009, 3:07 PM
  5. [CLOSED] Paging and the Grouping Summary
    By mjessup in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 05, 2009, 11:13 AM

Posting Permissions