jgGrid引數說明文件

2021-08-31 08:36:05 字數 2457 閱讀 2333

初始化jqgrid的方法:

function initjqgrid(),

mtype : 'post',

url : "$/babyis/wcbj/txgl/searchtree.action?yunzstart=1&yunzend=40",

colmodel : [

, ,],

pager : '#jqgriddiv', //分頁欄div的id

rownum : 10, //初始行數

rowlist : [10,15], //每頁的行數

viewrecords : true,

subgrid : true, //子表

subgridrowexpanded: function(subgrid_id, row_id) ,

onselectrow: function(id)

var value = rowdata.mmxm+"("+sjh+")";

window.sxrjson[ids[i]] = value;

} var sxr = document.getelementbyid("sxr");

setvaluetosxr(sxrjson, sxr);

$("#wcbj_txgl_sendalltxdx").hide();

},

onselectall: function(arowids,status)

var value = rowdata.mmxm+"("+sjh+")";

window.sxrjson[arowids[i]] = value;

}var sxr = document.getelementbyid("sxr");

setvaluetosxr(sxrjson, sxr);

$("#wcbj_txgl_sendalltxdx").hide();}}

});}

html頁面:

function searchtxyh(urlen) ).trigger("reloadgrid");

}

後台資料的組裝:

public void searchtree() throws exception 

if(stringutils.isnotempty(mcyjend))

if (stringutils.isnotempty(yunzstart) && stringutils.isnotempty(yunzend))

if (stringutils.isnotempty(mmxm))

int pagenum = 1;

if(stringutils.isnotempty(this.getparameter("page")))

pagenum = integer.parseint(this.getparameter("page"));

int pagesize = 10;

if(stringutils.isnotempty(this.getparameter("rows")))

pagesize = integer.parseint(this.getparameter("rows"));

pagination<?> results = this.txglmanager.findfztxyhbysql(sb.tostring(), mmdh, integer.valueof(pagenum), integer.valueof(pagesize));

jsonarray js = new jsonarray();

for (iterator<?> iter = results.getresults().iterator(); iter.hasnext();)

jsonobject obj = new jsonobject();

obj.put("rows", js);

obj.put("total", (results.gettotalcount() + pagesize - 1) / pagesize);

obj.put("page", pagenum);

obj.put("records", results.gettotalcount());

obj.put("searchstr", sb.tostring());

getresponse().setcontenttype("text/plain");

getresponse().setcharacterencoding("utf-8");

getresponse().getwriter().write(obj.tostring());

getresponse().getwriter().flush();

}

由於時間問題,就不整理後台**了,相信親們能看懂的。 

引數說明:

有個很全面的**:

給個鏈結,在這裡就不複製貼上了。

hive hql文件 HIVE說明文件

sql 查詢功能,可以將sql 語句轉換為 mapreduce 任務進行執行,通過自己的 sql去查詢分析需要的內容,這套 sql簡稱 hive sql,使不熟悉 mapreduce 的使用者很 方便的利用 sql語言查詢,彙總,分析資料。hive 適用性 它與關係型資料庫的 sql略有不同,但支援...

Mantis安裝說明文件

在錯誤追蹤系統中,mantis絕對是個輕量級的工具,無論安裝還是配置或使用,正如它自己的目標中所宣稱的。但是,對乙個中小型的專案來言,功能夠用。mantis是乙個基於php mysql web的開源的錯誤追蹤系統,以下安裝教程假設系統已經安裝好了apache php mysql的執行系統,如何安裝這...

Vue 基礎說明文件

vue是乙個mvvm框架,model view viewmodel 例項出的物件 el 檢視模型,頁面節點 data 所使用的變數,或者初始值 裡面通常放屬性 methods dom渲染完執行,通常是放view中需要響應的函式 解析資料 變數,函式,表示式 一 指令 1,v html v text ...