在页面内绑定多个JqGrid

时间:2015-09-14 03:56:19

标签: javascript jquery asp.net-mvc jquery-ui jqgrid

我必须在手风琴(JQ UI)中绑定jqGrids,这是我的代码:

这里我在手风琴里面绘制网格。

<div id="accordion" class="accordion-style2">
    <div class="group">
@foreach (var mytable in lstmytable )
{
        <h3 class="accordion-header">mytable.DAY_NAME</h3>
    <div divgrid="true" id="myDiv_@mytable.DAY_ID">
        <p>
            <table grid="true" id="grid_table_@mytable.DAY_ID"></table>
            <div pagerid="true" id="grid-pager_@mytable.DAY_ID"></div>
        </p>
    </div>
}
    </div>
    </div>
//here i get the ids from the grid and the pager 
 $("[divgrid='true']").each(function () {
               var GridID = jQuery(this).find("table").attr("id");
               var PagerID = jQuery(this).find("div").attr("id");
               BindGrid(GridID, PagerID);
            });

//here i bind the grids using different id each time .
BindGrid(gridID,PagerID)
{
var grid_selector = GridID;
var pager_selector = PagerID;
//my grid implementation 
}

但它永远不会绑定任何网格

0 个答案:

没有答案