[FIXED] [2.5] GridFilters - ListFilter - StoreId throw exception when rendering view

  1. #1

    [FIXED] [2.5] GridFilters - ListFilter - StoreId throw exception when rendering view

    using Ext.net 2.4 on MVC5 with Razor

    Following Code generates exception(screenshot in attachment):

    @(Html.X().StoreFor(typeof(Common.EnumElement))
                               .ID("PropertyTypeStore")
                               .DataSource(Common.EnumExtensions.ToList(typeof(SAB.Core.Models.PropertyType)))
                    )
    
                    @(Html.X().StoreFor(typeof(Common.EnumElement))
                                .ID("PropertyValueTypeStore")
                                .DataSource(Common.EnumExtensions.ToList(typeof(SAB.Core.Models.PropertyValueType)))
                    )
                    
                    @(Html.X().GridPanel()
                        .ID("PropertyGridPanel")
                        .Store(
                            Html.X().StoreForModel()
                                .Proxy(
                                    Html.X().AjaxProxy()
                                        .Url(Url.Action("GetProperties"))
                                        .Reader(Html.X().JsonReader().Root("data"))
                                )
                                .RemoteSort(true)
                                .PageSize(20)
                                .SorterFor(Model, m => m.Id, Ext.Net.SortDirection.ASC)
                        )
                        .ColumnModel(
                            Html.X().RowNumbererColumn().Text("Lp.").Width(35),
                            Html.X().ColumnFor(m => m.Id),
                            Html.X().ColumnFor(m => m.DisplayName),
                            Html.X().ColumnFor(m => m.Description),
                            Html.X().ColumnFor(m => m.PropertyValueType),
                            Html.X().ColumnFor(m => m.PropertyType),
                            Html.X().ColumnFor(m => m.CreatedBy),
                            Html.X().ColumnFor(m => m.ModifiedBy),
                            Html.X().ColumnFor(m => m.CreatedOn),
                            Html.X().ColumnFor(m => m.ModifiedOn)
                        )
                        .Features(
                              Html.X()
                                  .GridFilters()
                                  .Filters(
                                      Html.X()
                                        .ListFilter()
                                        .DataIndex(Model, m => m.PropertyType)
                                        .CustomConfig(a => a.AddRange(new List<ConfigItem>()
                                        {
                                            new ConfigItem("labelField", "Display")
                                        }))
                                        .StoreID("PropertyTypeStore")
                                        .IDField("Id")
                                  )
                        )
                    )
                }
    Workaround add customconfig to ListFilter:
    .CustomConfig(a => a.AddRange(new List<ConfigItem>()
                                        {
                                            new ConfigItem("store", "Ext.StoreMgr.get('PropertyTypeStore')", ParameterMode.Raw)
                                        }))

    If more data is needed just ask. Im new to this forum so i might forgot about something :)
    Attached Thumbnails Click image for larger version. 

Name:	extexception.jpg 
Views:	5 
Size:	99.9 KB 
ID:	7573  
    Last edited by Daniil; Feb 10, 2014 at 1:05 PM. Reason: [FIXED] [2.5]
  2. #2
    Hi @Redgood,

    Thank you for the report!

    Fixed in the SVN trunk, revision #5661. It will go to the v2.5 release.

Similar Threads

  1. [CLOSED] Grid ListFilter with StoreID, ValueField?
    By prointernet in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 22, 2012, 2:28 PM
  2. Replies: 2
    Last Post: Jun 24, 2011, 5:33 PM
  3. [CLOSED] ListFilter with a StoreID
    By SFritsche in forum 1.x Legacy Premium Help
    Replies: 14
    Last Post: Oct 08, 2010, 1:51 PM
  4. [CLOSED] ScriptManager throw exception in my masterpage
    By pumpkin in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 04, 2009, 3:09 AM

Posting Permissions