Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
460
Column with names that contains %,$, or #
posted

How should they be escaped? If a column name contains %, for e.g "TestColumn%" then the cells of that column become ${TestColumn%}.

Best Regards

Fredrik

 

 

Parents
No Data
Reply
  • 23953
    Verified Answer
    Offline posted

    Hello Fredrik,

    Infragistics Templating engine by default recognizes alpha-numeric field names, that's why your column which contain those special characters are not recognized. You cannot escape those characters, but you can extend the regular expression string which matches them to include your character in choice.

    Here is the code you should use before you create the igGrid:

    $.ig.regExp.sub = /\$\{(([\w\$\%\#]+(\.|\s)?[\w\$\%\#]*)+)\}/;

    As an alternative you have 2 more options to format your cell values:

    1. Use the jsRender template support in igGrid

    2. Use igGrid column formatter function.

    Hope this helps,
    Martin Pavlov
    Infragistics, Inc. 

Children