悉野小楼

导航

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在外面定义的 通过其它方式赋值给他们


posted on 2010-11-03 15:27  悉野  阅读(2058)  评论(0编辑  收藏  举报