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.

Why do not use special characters in grid id.

We used the JsRender to render grid and the grid id value to name the Jsrender helpers and templates.

So while using the special characters (+,-,>,< and etc) in grid id it will throws an error. Hence we must use only valid JavaScript name characters (a-z, A-Z, 0-9, _, $) as a grid id.

Example:

Please refer the below code snippet, here we have mentioned the grid id as "clients-grid"(which contains hyphen).

 $("#clients-grid").ejGrid({

 });

For example the helper to create alternate row will be named with the grid id as “_clients-gridAlternateRow” and the hyphen inside the JsRender template will be considered as “-” (minus symbol) and hence the error occurred.

In the below code snippet, you can see that the hyphen in the template is considered as minus symbol and the “clients” and “grid” are considered as individual property.

ret+=(v=view.hlp("_clients")-data.gridAlternateRow())!=u?v:””

The similar issue has been discussed in the below link:

https://github.com/BorisMoore/jsrender/issues/146

To resolve this issue, we suggest you to replace the hyphen ( clients-grid”) with the any of the above mentioned valid Javascript name characters (a-z, A-Z, 0-9, _, $) in the grid container id value.

 

Article ID: Published Date: Last Revised Date: Platform: Control:
4265 03/11/2015 08/06/2015 JavaScript ejGrid
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.