extjs自带分页, 载入数据时传入参数

如果extjs设置了ttbar

bbar: new Ext.PagingToolbar
                (
                    {
                        pageSize: pageSize,
                        store: gridData,
                        displayInfo: 
true,
                        displayMsg: 
"一共有{2}条数据"
                    }
                ),

 gridData重新载入时会自动上传start,limit值,但自己有时要附加参数,可以如下:

  gridData.on("beforeload"function(currentStore, options) {
                currentStore.baseParams["dept_id"= curDepartID;
                currentStore.baseParams["Semester_ID"= curSemesterID;
            });

curDepartID, curSemesterID在外面定义的 通过其它方式赋值给他们


原文地址:https://www.cnblogs.com/barrysgy/p/1868128.html