我必须在手风琴(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
}
但它永远不会绑定任何网格