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

Apply Column Chooser to grid with a custom command column resulting in javascript timeout / browser hang

Thread ID:





141362 Dec 7,2018 09:02 AM UTC Dec 12,2018 03:40 AM UTC ASP.NET MVC 4
Tags: Grid
Edwin Kurniawan
Asked On December 7, 2018 09:02 AM UTC

Hi, Syncfusion's admin,

I have a problem when using column chooser feature.
When column chooser applied in grid with a custom command column, the browser would hang (using firefox).
After i click stop script execution, a warning is shown in firefox console :

Error: Script terminated by timeout at: inArray@http://localhost:62501/jsbundles/jquery?v=BkQaZq6LCDeSX6OyYCg-MjSKGQX4bUH3YXGVNrzNGio1:1:101948 showColumns@http://localhost:62501/Scripts/ej/ej.widget.custom.min.js?v=636720097743422623:10:1998257 _addButtonCC@http://localhost:62501/Scripts/ej/ej.widget.custom.min.js?v=636720097743422623:10:2469520 r@http://localhost:62501/jsbundles/jquery?v=BkQaZq6LCDeSX6OyYCg-MjSKGQX4bUH3YXGVNrzNGio1:1:173014 _trigger@http://localhost:62501/Scripts/ej/ej.widget.custom.min.js?v=636720097743422623:10:13370 _btnMouseClickEvent@http://localhost:62501/Scripts/ej/ej.widget.custom.min.js?v=636720097743422623:10:38371 t.proxy/<@http://localhost:62501/Scripts/ej/ej.widget.custom.min.js?v=636720097743422623:10:27405 dispatch@http://localhost:62501/jsbundles/jquery?v=BkQaZq6LCDeSX6OyYCg-MjSKGQX4bUH3YXGVNrzNGio1:1:137137 add/a.handle@http://localhost:62501/jsbundles/jquery?v=BkQaZq6LCDeSX6OyYCg-MjSKGQX4bUH3YXGVNrzNGio1:1:135209

Edwin Kurniawan
Replied On December 8, 2018 11:52 AM UTC

I think i found what was triggering the script execution timeout, i was using 2 command columns with no header text which makes the script buggy because of the ambiguous columns.

For now, i just use 1 command column.
Please let me know if there is any fix or workaround.

Vignesh Natarajan [Syncfusion]
Replied On December 10, 2018 02:24 PM UTC

Hi Edward, 
Query: “i was using 2 command columns with no header text which makes the script buggy because of the ambiguous columns. ” 
From your query, we understand that you are facing issue while using columnChooser when two command column has no headertext. By default while using columnChooser we will loop through column and hide/show column based on the field value or headerText. But in your scenario field is undefined and HeaderText will also be empty. So this is the cause of the issue. No two columns can have same headerText similar to empty text).  
If you still wish to have two custom command column without headerText, then we suggest you to define as headerText as “<a></a>” for any one of the column. refer the below code example 
.                .                 .                  .       .                 .       .              .  
col.Field("ShipCountry").HeaderText("Ship Country").Width(90).Add();            col.Field("Verified").HeaderText("Verified").EditType(EditingType.BooleanEdit).Width(75).Add(); 
                col.HeaderText("").Commands(command => 
                           .ButtonOptions(new Syncfusion.JavaScript.Models.ButtonProperties() 
                               Text = "Edit" 
                col.HeaderText("<a></a>").Commands(command => 
                     .ButtonOptions(new Syncfusion.JavaScript.Models.ButtonProperties() 
                         Text = "Save" 
Note:  This is just a workaround. So it has some limitations. 
Vignesh Natarajan 

Edwin Kurniawan
Replied On December 11, 2018 04:40 AM UTC

Thank you for the reply Vignesh.

I've tried your suggestion and it works fine with my code.

Manivannan Padmanaban [Syncfusion]
Replied On December 12, 2018 03:40 AM UTC

Hi Edward, 

Thanks for the update. 

We are happy to hear that the reported issue was resolved. Please let us know if you need further assistance. 


Manivannan Padmanaban. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon