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.
Unfortunately, activation email could not send to your email. Please try again.

Excel and menu filtertypes do not work when grid is initialized without data

Thread ID:





120126 Sep 3,2015 01:08 AM Sep 11,2015 12:36 AM JavaScript 3
Tags: ejGrid
Jim Woods
Asked On September 3, 2015 01:08 AM

Using the example from the Grid - Getting Started page (http://docs.syncfusion.com/js/grid/getting-started), if I start out with an empty grid and then refresh the data the excel and menu filtertypes do not work.  After I assign a datasource (from another function that I call), I get the following error message: 

'Uncaught TypeError: n.render[((this.id + this._$colType) + "_listBox_Template")] is not a function'

Is there a work around for this behavior?

window.gridData = [
        { firstName: "John", lastName: "Beckett", email: "john@syncfusion.com" },
        { firstName: "Ben", lastName: "Beckett", email: "ben@syncfusion.com" },
        { firstName: "Andrew", lastName: "Beckett", email: "andrew@syncfusion.com" }

                //dataSource: window.gridData,
                allowFiltering: true,
                filterSettings: { filterType: "excel" },
                allowPaging: true,
                allowSorting: true,
                pageSettings: { pageSize: 5 },
                columns: [
                   { field: "firstName",headerText:"First Name" },
                   { field: "lastName", headerText: "Last Name" },
                   { field: "email", headerText: "Email" }

$("#Grid").ejGrid("dataSource", window.gridData);

Prasanna Kumar Viswanathan [Syncfusion]
Replied On September 4, 2015 03:24 AM

Hi Jim,
Thanks for Contacting Syncfusion support.
When we bind an empty datasource, Grid cannot find the actual data type of a column. So, the mentioned issue occurred while filtering the column.
For this case, you have to set datatype for the column using type property.
We have a Knowledge Base for type property that you can refer from the following link:
Please find the sample from the following link:
Sample Link: http://www.syncfusion.com/downloads/support/forum/120126/ze/Html_Encode_Feature-944278058
Prasanna Kumar N.S.V

Jim Woods
Replied On September 9, 2015 11:49 PM

Thank you.  That worked!

Prasanna Kumar Viswanathan [Syncfusion]
Replied On September 11, 2015 12:36 AM

Hi Jim,

We are happy that the provided details helped you.

Please let us know if you need any further assistance.

Prasanna Kumar N.S.V


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.