jQWidgets Forums

jQuery UI Widgets Forums Grid Highlight filtered cells

This topic contains 1 reply, has 1 voice, and was last updated by  aqssas 8 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Highlight filtered cells #94000

    aqssas
    Participant

    Hi support team,

    Any way to highlight the filter result as shown in the attached image ?
    https://ibb.co/cAxkfv

    Thanks,
    Akram

    Highlight filtered cells #94045

    aqssas
    Participant

    Hello, I created a solution
    function higlightRender(index, datafield, value, defaultvalue, column, rowdata) {

    var txt = instance.highlightTextValue;
    if (txt) {

    var elm = $(defaultvalue);
    var html = elm.html();

    var index = html.search(new RegExp(txt, “i”));
    if (index >= 0)

    txt = html.substring(index, index + txt.length);
    html = html.replace(new RegExp(txt, ‘ig’), ‘<span style=”background-color:yellow”>’ + txt + ‘</span>’);

    elm.html(html);
    defaultvalue = elm[0].outerHTML;

    }
    return defaultvalue;

    }

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.