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

Grid FilterType Excel not clickable when setting columns

I have an excel type filter on my ASP grid
When the grid populates the columns automatically, the filter icon (in the header, next to header text) is clickable, but when i add etc to the grid, the filter icon is no longer clickable and i get the following console error when clicking on it:
Uncaught TypeError: Cannot read property 'width' of null
the error is on this line of the js
dlgWidth = this._isExcelFilter ? this._excelFilter._dialogContainer.width() : dlgWidth;
Any help appriciated.

1 Reply

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team August 25, 2016 09:13 AM UTC

Hi Semper, 

We are able to reproduce the problem at our end after binding empty dataSource to the Grid. The Grid will define the column type based on the value present in the first record of the data bound to the Grid.  We have already discussed about this problem and its solution in the following KB. 

Refer to the following code example and define the column type if the dataSource bound to the Grid is empty. 

    <ej:Grid ID="FlatGrid" runat="server" AllowScrolling="true" AllowFiltering="true" AllowSorting="true" AllowTextWrap="true"> 
       <FilterSettings FilterType="Excel"></FilterSettings> 
            <ej:Column Field="OrderID" Type="number" HeaderText="Order ID" TextAlign="Right" Width="90" /> 
            <ej:Column Field="CustomerID" Type="string" HeaderText="Customer ID" Width="150" /> 
            <ej:Column Field="EmployeeID" Type="number"  HeaderText="Employee ID" TextAlign="Right" Width="100" /> 
 . . . . . . 

        protected void Page_Load(object sender, EventArgs e) 

We have prepared a sample that can be downloaded from the following location. 

If you are still facing any problem, please share the following information to replicate the issue. 

1)      You have mentioned the columns were dynamically. Can you please explain scenario and code for dynamic render of Columns? 
2)      Code example of Grid and customized scripts 
3)      If possible, modify the attached sample and replicate the issue. 

Seeni Sakthi Kumar S. 

Live Chat Icon For mobile
Up arrow icon