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
close icon

Change locale at runtime

Is is possible to change locale of grid at runtime? Grid initial locale is 'id-ID'
I tried using this syntax :
     var grid = $('#myGrid').ejGrid('instance'); //already initialized with some data
     grid.option({ locale: 'en-US' });
//data example: (in json stringify mode) "[{"Seq":1,"ItemName":"I Phone 6S","Qty":1,"UnitPrice":8840000,"DiscPerc":3,"DiscAmount":0,"Total":8574800,"Description":"Black","Id":4}]"

but getting this error in return :
TypeError: Argument 1 of Node.replaceChild is not an object.

I am using : Essential Studio Enterprise Edition - Community license ver. 15.1.0.41

And additional question, how to show column chooser with javascript function (not from column chooser button)?

1 Reply

MS Mani Sankar Durai Syncfusion Team June 12, 2017 08:44 AM UTC

Hi Edwin, 

Thanks for contacting Syncfusion support. 

Query 1: Is it possible to change locale of grid at runtime?  
We have analyzed your query and based on your requirement we have already shown a demo by changing the localization for grid at run time. Please refer the below link 
We have also prepared a sample that can be available from the below link. 
If you still face the issue please get back to us with the following details. 
1.       Share the screenshot/ video of the issue that you have faced. 
2.       Share the stack trace of the issue that you have faced. 
3.       If possible please reproduce the issue in the above attached sample and provide us. 
The provide information will help us to analyze the issue and provide you the response as early as possible. 

Also refer the following links of how to pass the JSON string value 

Query 2: How to show column chooser with JavaScript function (not from column chooser button)? 
 Based on your requirement we have already documented a Syncfusion knowledge base by showing the column chooser externally in JavaScript function and the same can be available from the below link. 

Please let us know if you need further assistance. 

Regards, 
Manisankar Durai. 


Loader.
Live Chat Icon For mobile
Up arrow icon