We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Error on initialization

After upgrading syncfusion from 14.2.0.32 to 14.4.0.15 and fixing some js & css file naming changes,
i get the following error when loading page & rendering a grid (previous ver working fine)

uncaught exception: ejScroller: methods/properties can be accessed only after plugin creation t.throwError@http://localhost:52302/Scripts/ej/ej.web.all.min.js:10:27908 t.widget/n.fn[f]@http://localhost:52302/Scripts/ej/ej.web.all.min.js:10:21809 t.gridFeatures.common.getScrollObject@http://localhost:52302/Scripts/ej/ej.web.all.min.js:10:2529594 t.gridFeatures.selection.selectRows@http://localhost:52302/Scripts/ej/ej.web.all.min.js:10:2868760 @http://localhost:52302/:246:13 n.Callbacks/i@http://localhost:52302/Scripts/jquery-2.2.3.min.js:2:27146 n.Callbacks/j.fireWith@http://localhost:52302/Scripts/jquery-2.2.3.min.js:2:27914 .ready@http://localhost:52302/Scripts/jquery-2.2.3.min.js:2:29705 J@http://localhost:52302/Scripts/jquery-2.2.3.min.js:2:29890


Here is my grid code :

@(Html.EJ().Grid<ProcessStatusModel>("SFGridProcessStatus")
                .Locale(WorkingLocale)
                .GridLines(GridLines.Vertical)
                .EnableHeaderHover(true)
                .EnableTouch(false)
                .AllowPaging(true).PageSettings(page => { page.PageSize(15); })
                .AllowFiltering(true).FilterSettings(d => d.FilterType(FilterType.Menu))
                .AllowSorting(true).AllowMultiSorting().SortSettings(sort =>
                {
                    sort.SortedColumns(col => col.Field("CompanyCode").Add());
                })
                .AllowGrouping(true).GroupSettings(group => { group.EnableDropAreaAutoSizing(true); })
                .AllowResizing(true)
                .AllowReordering(true)
                .ShowColumnChooser()
                .ContextMenuSettings(contextMenu => { contextMenu.EnableContextMenu(); })
                .MinWidth(650)
                .IsResponsive(true).AllowScrolling(true)
                .EditSettings(edit => { edit.AllowAdding(false).AllowEditing(false).EditMode(EditMode.Normal).AllowEditOnDblClick(true).AllowDeleting(false).ShowDeleteConfirmDialog(true); })
                .ToolbarSettings(toolbar =>
                {
                    toolbar.ShowToolbar(true)
                    .ToolbarItems(items =>
                    {
                        items.AddTool(ToolBarItems.Search);
                    })
                    .CustomToolbarItems(new List<object>() {
                        new CustomToolbarItem() { TemplateID = "#sfgrid-btn-expand" },
                        new CustomToolbarItem() { TemplateID = "#sfgrid-btn-collapse" }
                    });
                })
                .Columns(col =>
                {
                    col.Field("CompanyId").HeaderText(T("Common.Id").Text).IsPrimaryKey(true).IsIdentity(true).Visible(false).AllowEditing(false).Add();
                    col.Field("CompanyCode").HeaderText(T("Company.CompanyCode").Text).Width(100).Add();
                    col.Field("CompanyName").HeaderText(T("Company.CompanyName").Text).Width(230).Add();
                })


3 Replies

EK Edwin Kurniawan December 6, 2016 03:27 PM UTC

After investigate more, i found out that i have a hidden grid on page load which will appear on button click.
And i'm doing grid.selectRows(0); on document ready is what causing this error (the grid need to be visible at least once to make the error gone), but this case is not happening on prior version (14.2.0.32).


EK Edwin Kurniawan December 7, 2016 05:16 PM UTC

Another case : doing grid.selectRows(0) when there is no data on the grid will trigger the error too (which was not happening on prior version (14.2.0.32))


RU Ragavee U S Syncfusion Team December 8, 2016 09:34 AM UTC

Hi Edwin, 

We confirmed this query “script error thrown when select rows in empty grid” as a breaking issue and a support incident has been created under your account to track the status of this feature. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents   

Regards, 
Ragavee U S. 


Loader.
Up arrow icon