jQWidgets Forums

jQuery UI Widgets Forums Grid highlight cell only for few seconds

This topic contains 1 reply, has 2 voices, and was last updated by  Stanislav 8 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • highlight cell only for few seconds #93065

    jahnvi25
    Participant

    i have this requirement where we update cell value based on data we get from streaming server at run time.. when we update the cell value.. right after that i have to highlight the same cell for 2 or 3 seconds. how can i do that ??

    highlight cell only for few seconds #93093

    Stanislav
    Participant

    Hi jahvani25,

    Here is a sample solution for your problem:

     $("#jqxgrid").on('cellendedit', function (event) {
            let rowID = <code>row${event.args.rowindex}jqxgrid</code>; 
            let cells = $(<code>#${rowID} div</code>);
            let myCell;
            for (let i = 0; i < cells.length; i++) {
                if (cells[i].children[0])
                    if (cells[i].children[0].value)
                        myCell = cells[i]
            }
            setTimeout(() => {
                $(myCell).addClass('jqx-grid-cell-hover jqx-fill-state-hover');
            });
    
            setTimeout(() => {
                $(myCell).removeClass('jqx-grid-cell-hover jqx-fill-state-hover');
            },2000)
    
        });

    There is a chance that you may have to change something little in order to make it work with your configuration.

    Best Regards,
    Stanislav

    jQWidgets Team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.