| [Grid] <ej-grid id="DetailGrid" databound="dataBound" allow-selection="false" allow-text-wrap="true" allow-paging="false" is-responsive="false" enable-row-hover="true" > . . . <e-columns> . . . </e-columns> </ej-grid> <script> function dataBound(args) { //here bound a mouseover event for grid cell this.element.on("mouseover", ".e-gridcontent tr td", function (e) { var gridObj = $("#DetailGrid").ejGrid("instance"), colLen = gridObj.model.columns.length ;//create a grid instance for (var i = 0; i < colLen; i++) { if (gridObj.model.columns[i].field == "EmployeeID" && i == $(e.target.closest('td')).index()) { //here rende a tooltip $(e.target).ejTooltip( { showShadow: true, width: "600px", height: "350px", content: '<div class="main" style="height:300px, width:400px"></div>', }); // render the another grid within a tooltip while hovering the cell $(".main").ejGrid({ // the datasource "window.gridData" is referred from jsondata.min.js dataSource: window.gridData, allowPaging: true, isResponsive: true, minWidth: 700, height:200, columns: [ . . . ] }); } } }) } </script> |
Hi,Venkatesh Ayothiraman.
Thank you for your reply.I'll try it out.