Pregunta

I have a jqgrid in which i need to show a subgrid on mouse hover on particular row ...But i have no idea of the possibility of the same...

I am binding the json data locally into my jqgrid through ajax call...Is there any event for onmouse hover on Jqgrid rowid ...

Any one who has worked on it or have idea please guide in right direction ...

Here is my loading details...

$(document).ready(function () {
    $("#go").click(function () {
        $("#gridId").GridUnload();
        gridload();
    });
});

Thanks in advance..

¿Fue útil?

Solución

One can interpret in different ways what you mean under "i need to show a subgrid on mouse hover". I suppose that you need to expend the subgrid on hovering of the rows.

I modified the demo from the answer to demonstrates one possible implementation of the requirement. The results you can see here. The implementation consists from inserting the following code inside of loadComplete callback:

loadComplete: function () {
    var $this = $(this);

    $this.find(">tbody>.jqgrow")
        .mouseenter(function (e) {
            if ($(this).find(">td.ui-sgcollapsed").length > 0) {
                $this.jqGrid("expandSubGridRow", this.id);
            }
        });
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top