[CLOSED] responsiveconfig reliable?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] responsiveconfig reliable?

    hello
    I wanted to use responsiveconfig but could not get MVC version working, is this reliable? what experience do you guys have with it?

    Here is an example which should change the width of grid as soon as the screen is "tall".
    Is the usage incorrect or there is bug in responsiveconfigs:

    example as GridPanel/ArrayGrid/Simple/
    @model System.Collections.IEnumerable
    
    @{
        ViewBag.Title = "Simple Array Grid - Ext.NET MVC Examples";
        Layout = "~/Views/Shared/_BaseLayout.cshtml";
    }
    
    @section headtag
    {
        <style>
            .x-grid-row-over .x-grid-cell-inner {
                font-weight : bold;
            }
        </style>
    
        <script>
            var template = '<span style="color:{0};">{1}</span>';
    
            var change = function (value) {
                return Ext.String.format(template, (value > 0) ? "green" : "red", value);
            };
    
            var pctChange = function (value) {
                return Ext.String.format(template, (value > 0) ? "green" : "red", value + "%");
            };
        </script>
    }
    
    @section example
    {
        <h1>Simple Array Grid</h1>
    
        @(Html.X().GridPanel()
                           .ResponsiveConfig(cfg =>
                               {
                            
                            var tall = new ResponsiveRule();
                            tall.Rule = "tall";
                            tall.Config.Add(Html.X().GridPanel().Width(200));
                                   
                            cfg.Add(tall);
                        })
            .Title("Array Grid")
            .Width(600)
            .Height(350)
            .Store(Html.X().Store()
                .Model(Html.X().Model()
                    .Fields(
                        new ModelField("company"),
                        new ModelField("price", ModelFieldType.Float),
                        new ModelField("change", ModelFieldType.Float),
                        new ModelField("pctChange", ModelFieldType.Float),
                        new ModelField("lastChange", ModelFieldType.Date, "M/d hh:mmtt")
                    )
                )
                .DataSource(Model)
            )
            .ColumnModel(
                Html.X().Column().Text("Company").DataIndex("company").Flex(1),
                Html.X().Column().Text("Price").DataIndex("price").Renderer(RendererFormat.UsMoney),
                Html.X().Column().Text("Change").DataIndex("change").Renderer("change"),
                Html.X().Column().Text("Change").DataIndex("pctChange").Renderer("pctChange"),
                Html.X().DateColumn().Text("Last Updated").DataIndex("lastChange")
            )
        )
    }
    Last edited by fabricio.murta; Oct 29, 2016 at 9:04 PM. Reason: no user feedback for 7+ days

Similar Threads

  1. Replies: 1
    Last Post: Dec 19, 2015, 11:14 AM
  2. responsiveConfig is problem
    By aimboss in forum 3.x Help
    Replies: 2
    Last Post: Mar 16, 2015, 2:43 AM
  3. Replies: 2
    Last Post: Mar 06, 2015, 2:21 PM

Tags for this Thread

Posting Permissions