Edit cell properties in JQGrid

后端 未结 2 816
既然无缘
既然无缘 2021-01-16 16:37

I am a beginner in JQ grid. In my JQ grid I have a image in a column added as an anchor tag. Onclick of the particular cell I need to change the image only for that cell. I

2条回答
  •  半阙折子戏
    2021-01-16 16:53

    @Oleg: Thanks for your input. I am sure that urs is the right way to go about it, but I had to use the solution mentioned below because of the limitations of existing implementation.

    $('.clickableTitle').live('click', function () { 
        $('body').css('cursor', 'wait'); 
        var commentIconStat = $(this).parents('table:first').getCell($(this).parents('tr:first').attr('id'), 'comment');  
        //Turn read comment off 
        if (commentIconStat.search(/iconCommentOn/i) > -1) { 
            commentIconStat = commentIconStat.replace(/iconCommentOn/i, "iconCommentOff"); 
            $(this).parents('table:first').setCell($(this).parents('tr:first').attr('id'), 'comment', commentIconStat, '')
    
        } 
        $('body').css('cursor', 'default'); 
    });
    

提交回复
热议问题