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
355
iggrid - Change Font color in Edit mode conditionally
posted

How can I change the cell values font color in edit more conditionally?

Parents
  • 175
    posted

    If you are attempting to do on load then the following should work:

    Create a javascript function that returns the desired html, for example:

           <script id="colTmpl" type="text/template">
            {{if parseInt(${ID}) >0 }}
                ${REPORT_ID}
            {{else}}
                ${NAME}
            {{/if}}
        </script>

    Define column settings for the desired column as follows:

    { headerText: "", key: "NAME", width: "30%", dataType: "string", template: $( "#colTmpl" ).html() }

    This utilizes ifragistics column templating and templating engine, see the followings docs:

    http://www.igniteui.com/help/creating-a-basic-column-template-in-the-iggrid

    http://www.igniteui.com/help/igtemplating-overview

    Hoe this helps, happy coding

Reply Children