ExtJs无法正确分页,有数据

表格没法翻页,表格只有25行,store穿了27条数据,没法翻页,看图图片说明

1个回答

要在grid的store里面设置page的值,不是在gridpanel中设置page值

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
extjs grid 分页数据无法刷新
从控制台看,点击下一页的时候请求成功发送到后台,也能看到从后台传过来的值,但是页面上的grid的数据并没有改变,无论是点上一页还是下一页,数据始终显示的是页面加载时的数据。这个是什么回事呢,求大神解答!!!!!!
EXTJS,数据无法提交
我在文本框里输入信息,然后要换行,在文本框里按了回车。为什么这就提交不上去了。rn高手指点,在线等!!!
ExtJS远程数据-本地分页
背景     一般情况下,分页展示是前端只负责展示,后台通过SQL语句实现分页查询。当总数据量在千条以下,适合一次性查询出符合条件的所有数据,让前端页面负责分页也是一种选择。 实例     现通过ExtJS 4扩展类库Ext.ux.data.PagingStore来实现分页,建议使用前在GitHub获取最新版本。     使用时非常简单,只需将Store的继承类改为“E
Extjs分页数据与后台交互
自己就是记记笔记,欢迎讨论,测试通过 1,前端代码 这里最重要的就是::1)路径:url:"role/search.do" 2)配置json数据格式:例如:[{"total":50,"rows":[{"a":"3","b":"4"}]}];其中total,rows必须跟reader里一一对应  Ext.onReady(function(){        var roleStore
虚心求教!Extjs vtype 无法正确返回值
Ext.apply(Ext.form.field.VTypes,rn cityNameExist:function(value,field)rn var exist = false;rn Ext.Ajax.request(rn url:'listCity.action',rn params:rn start:0,rn limit:25,rn 'entity.name':value.trim()rn ,rn method:'POST',rn success:function(response)rn var totalCount = Ext.decode(response.responseText).totalCount;rn if(totalCount > 0)rn ReturnValue(false);rn elsern ReturnValue(true);rn rn rn );rn function ReturnValue(b) rn exist = b;rn rn return exist;rn ,rn cityNameExistText:'该城市已经存在'rn );rn永远都返回的是false,难道是JavaScript 作用域的问题? 求如何返回值!rn
Extjs 分页
我在gridpanel中加了分页,pagesize设置10,但是没效果,而且在gridpanel中显示了所有数据,有滚动条rnrn现在我不想显示所有数据,并且不要滚动条,要按pagesize:10这样的显示!autoScroll:false无效
ExtJS 分页
初学ExtJS,在用Grid分页时出现一问题好几天了都找不到原因,请高手帮我看一下。rn问题描述:出来的表格上一页、下一页和第一页、最后一页按钮不能按,而且右下角的“显示xx-xx条”也不对,如数据库一共有14条记录,我将start设为8, limit设为10,实际显示如下图:[img=https://img-bbs.csdn.net/upload/201402/02/1391339089_49529.png][/img]当按刷新后就会全部显示所有记录,但页数仍然只有一页,在JAVA后台打印出start和limit之后发现start已经变为0, limit为25,都好百度好几天了依然找不出问题所在,求大神帮忙!rn前台ExtJS代码如下:rn以下是View:rn[code=javascript]/**rn * Created by jun on 14-1-23.rn */rnExt.define('MyDev.view.ID_0101', rn extend: 'Ext.form.FormPanel',rn alias: 'adduser',rn requires: ['MyDev.store.ID_0101'],rn initComponent: function()rn Ext.apply(this,rn id: 'adduser',rn region: 'center',rn default: rn autoScroll: true,rn bodyPadding: 0rn ,rn border: false,rn items: [rn rn fieldLabel: '姓名',rn name: 'name',rn hiddenName: 'name',rn xtype: 'textfield'rn ,rn rn fieldLabel: '用户代码',rn name: 'nickName',rn hiddenName:'nickName',rn xtype: 'textfield'rn ,rn rn fieldLabel:'所属部门',rn name: 'department',rn hiddenName: 'department',rn xtype: 'combo',rn triggerAction: 'all',rn valueField: 'dpt_id',rn displayField: 'name',rn allowBlank: true,rn emptyText: '请选择',rn store: new Ext.data.SimpleStore(rn fields:['dpt_id', 'name'],rn proxy: rn type: 'ajax',rn url: '/mydev/content/DepartmentListAction.action',rn reader: rn type: 'json'rn rn rn )rn ,rn rn fieldLabel: '用户组',rn name: 'usergroup',rn hiddenName: 'usergroup',rn xtype: 'combo',rn triggerAction: 'all',rn valueField: 'grpID',rn displayField: 'grpName',rn model: 'local',rn allowBlank: true,rn emptyText: '请选择',rn store: new Ext.data.SimpleStore(rn fields: ['grpID', 'grpName'],rn data:[rn ['01', '超级用户'],rn ['02', '一般用户']rn ]rn )rn ,rn rn fieldLabel: '密码',rn name: 'password',rn hiddenName: 'password',rn xtype: 'textfield',rn inputType: 'password'rn ,rn rn id: 'userList',rn title: '用户列表',rn xtype: 'grid',rn region: 'center',rn height: 300,rn default: rn autoScroll: true,rn bodyPadding: 10rn ,rn viewConfig: rn forceFit: true //是否自适应大小rn ,rn store: userStore,rn columns:[rn header: '姓名', dataIndex: 'name',rn header: '用户代码', dataIndex: 'nickname',rn header: '所属部门', dataIndex: 'department',rn header: '用户组', dataIndex: 'usergroup',rn header: '状态', dataIndex: 'status'rn ],rn bbar: new Ext.PagingToolbar(rn pageSize: 10,rn store: userStore,rn displayInfo: truern )rn rn ]rn );rn this.callParent(arguments)rn rn);rnvar userStore = Ext.create('MyDev.store.ID_0101');[/code]rn以下是Store:rn[code=javascript]Ext.define('MyDev.store.ID_0101',rn extend: 'Ext.data.Store',rn requires: ['MyDev.model.ID_0101'],rn model: 'MyDev.model.ID_0101',rn baseParams: limit:10,rn autoLoad: params:start: 8, limit: 10,rn proxy:rn type: 'ajax',rn // url: '/mydev/app/json/t.json',rn url: '/mydev/content/UserListAction.action',rn reader:rn type: 'json',rn successProperty: 'success',rn root: 'user',rn totalProperty: 'totalProperty'rn rn rn );[/code]rn以下是Model:rn[code=javascript]Ext.define('MyDev.model.ID_0101',rn extend: 'Ext.data.Model',rn fields:[name:'name', name:'nickname', name:'department', name:'usergroup', name:'status']rn)[/code]rn以下是后台返回的JSON:rn[code=text]success:true,totalProperty:14,user:[name:'sfsf',nickname:'sfsfsdf',department:'sfsfsf',usergroup:'sfasfasdf',status:'1',name:'fsadfasdfasf',nickname:'asfasfasfdas',department:'sdfasdfasdfasf',usergroup:'asdfasfwefasf',status:'1',name:'asfwefafasdf',nickname:'asffawefafasf',department:'asfasfasfasf',usergroup:'asdfasdfasfasf',status:'1',name:'asdfasdfasf',nickname:'asdfasdffasfweasdf',department:'asdfasdfasfas',usergroup:'safwefasfasdfasf',status:'1',name:'asdfasdfewfasfas',nickname:'asdfawefasfasdfasf',department:'asfawefasfag',usergroup:'fasdfwefasfasdf',status:'1',name:'asdfasfdewaesf',nickname:'fasdfasfdawefasdf',department:'asdfasfweff',usergroup:'asdffaweasfasf',status:'1'][/code]
Extjs分页
Ext.onReady(function()rn var ds = new Ext.data.Store( rn //autoLoad:params:start:0,limit:2,rn proxy : new Ext.data.HttpProxy( rn url : 'getAllWhyzl.action'rn ),rn reader : new Ext.data.JsonReader( rn root : 'results',rn totalProperty : 'totalCount',rn id : 'IWhyid',rn successProperty : '@success'rn , [ rn name : 'whyzl.IWhyid',rn mapping : 'IWhyid'rn , rn name : 'whyzl.CWhyno',rn mapping : 'CWhyno'rn , rn name : 'whyzl.CWhyname',rn mapping : 'CWhyname'rn , rn name : 'whyzl.IDeptid',rn mapping : 'IDeptid'rn , rn name : 'whyzl.CPhone',rn mapping : 'CPhone'rn , rn name : 'whyzl.CWhyStatus',rn mapping : 'CWhyStatus'rn ])rn );rn var grid = new Ext.grid.EditorGridPanel(rn collapsible : true,rn animCollapse : false,rn iconCls : 'icon-grid',rn store : ds,rn renderTo : 'topic-grid',rn columns:[new Ext.grid.RowNumberer(), rn id : 'id',rn header : '内编号',rn dataIndex : 'whyzl.IWhyid',rn width : 40rn , rn header : "人员编号",rn dataIndex : 'whyzl.CWhyno',rn editor:new Ext.form.TextField(rn allowBlank:falsern ),rn width : 50,rn sortable : true,rn locked : falsern , rn header : "人员姓名",rn dataIndex : 'whyzl.CWhyname',rn editor:new Ext.form.TextField(rn allowBlank:falsern ),rn width : 100rn ,rn header : "人员类型",rn dataIndex : 'whyzl.IDeptid',rn editor:new Ext.form.TextField(rn allowBlank:falsern ),rn width : 100rn , rn header : "联系方式",rn dataIndex : 'whyzl.CPhone',rn editor:new Ext.form.TextField(rn allowBlank:falsern ),rn width : 100rn , rn header : "工作状态",rn dataIndex : 'whyzl.CWhyStatus',rn width : 100rn rn ],rn viewConfig : rn forceFit : truern ,rn sm:new Ext.grid.RowSelectionModel(),rn bbar:new Ext.PagingToolbar( rn pageSize : 1,rn store :ds,rn displayInfo : true,rn displayMsg : '显示 0-1条 / 共 2 条',rn emptyMsg : "无数据。",rn items : ['-', rn pressed : true,rn enableToggle : true,rn text : '按钮',rn cls : 'x-btn-text-icon details'rn ]rn )rn====================================================rn怎么写分页啊?rn是store那加个属性:autoLoad:start:0,limit:2,rn我总是显示所有rn是不是在后台还要进行什么转换啊
extjs 分页
extjs 分页 从dao到action
ExtJs分页
Extjs+springmvc登录注册,分页,sqlserver08
extjs分页
extjs分页,第一页显示的数据条数是正确的,第二页显示的数据条数为所有数据出去第一页数据的条数,第三页显示的数据也为正确值,系统由第一页进入到第二页时,请求的数据分页数值是正确的,但是查询的结果是不正确的,这是为什么呢,不知道是什么原因,各位高手麻烦看看呀,有什么解决的办法呀...
DataGrid无法正确显示分页信息?
DataGrid无法正确显示分页信息。我在page_load中设定了数据的绑定,在private void DataGrid1_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)rn rn upPager=true;rn this.DataGrid1.CurrentPageIndex=e.NewPageIndex;rn bind();rn          }rn也设定了datakeyfiled,可是只能正确的显示第一页,向后几页无数据显示,但依然能翻,在回到第一页,第一页也无数据(空白)显示了,我找了很多地方,不知道朋友们知道哪有问题吗?rnrn谢谢了!
ExtJS Gridpanel分页以及绑定数据问题
var js = Ext.util.JSON.decode(webser.GetRows(key, "cad"));rnrn var store = new Ext.data.Storern ( rn reader: new Ext.data.ArrayReader(,colDS ),rnrn proxy: new Ext.data.MemoryProxy(js)rn );rn store.load();rn rn var colMArrs = colM.split(";");rn var colMArr = new Array();rn var colMArray = new Array();rn var colDS = new Array();rn for (var i = 0; i < colMArrs.length; i++) rn colMArr = colMArrs[i].split(",");rn colMArray[i] = header: colMArr[1], width: 75, dataIndex: colMArr[1] rn colDS[i] = name: colMArr[1] ;rn rn var column = new Ext.grid.ColumnModel(rn colMArrayrn );rnrn var grid = new Ext.grid.GridPanel(rn rn border: false,rn region: 'center',rn width: 1000,rn height: 150,rn store: store, rn cm: column,rn viewConfig: rn forceFit: truern ,rnrnrn关于问题的代码就贴在这了.js是后台传过来的json转换成的数组,我把json贴出来吧.格式差不多就是这样,因为数据太多所以我删了大部分,留这点样式给大家看一下,rn"["Document Number":"doc_001","Revision":"A","Name":"手机","Type":"Drawing","State":"Preliminary","Native File":"~vs9283.sql","Viewable File":"ArasIOM.vb","Changes":"0"rnrncolM = "item_number,Document Number;major_rev,Revision;name,Name;classification,Type;state,State;native_file,Native File;viewable_file,Viewable File;has_change_pending,Changes"rnrn因为用Ext的转换方法后自动把字段排序了.也就是JS的值,本来应该是Document Number第一列的.但是变成是Changes了,rn最后的问题是,Grid里什么也没显示,没有任何东西.我不知道是不是排序那里出的问题,请各位大神帮忙看一下 谢谢了rn
Extjs grid 分页多选 数据不会丢失
用 SpringMVC hibernate EXtjs 开发的时候会大量使用 extjs grid 作为数据的展示控件,也会操作数据,那么grid 在要选择数据的时候,就需要注意,如果grid是分页,那我们一般会  监听他的 CheckBox 的选择事件和反选择事件,选择的时候把对应的ID放在一个全局数组中,在反选择的时候就把对应的ID从全局数组中删除,然后再监听store的load事件,每次加载
ExtJs 分页问题,看不到数据,在线等
在利用ExtJs4.2进行分页时,能够从后台获取到Json数据,但在Grid中只能看到有一条记录,而且是空的,帮忙看下为什么分页不成功 rnrnrn[code=javascript] //数据部分rn var maillist = Ext.create('Ext.data.Store', rn buffered: false,rn autoLoad: true,rn fields: ['SenderTrueName',rn name: 'SendDate', type: 'date', dateFormat: 'timestamp' ,rn 'Title', 'Status', 'Id', 'Checked'],rn proxy: rn waitTitle: '提示',rn waitMsg: '正在载入邮件数据...',rn type: 'ajax',rn url: '/Data/getMailList?UserId=' + UserId + '&Flag=' + Flagrn ,rn reader: rn type: 'json', rn totalProperty: 'Total',rn root: 'mails' ,rn pageSize: 18rn );[/code]rnrn[code=javascript] //表格部分rn var mailtable = Ext.create('Ext.grid.Panel', rn width: Ext.innerWidth,rn height: Ext.innerHeigh,rn forceFit: true,rn autoScroll: true,rn buffered: true,rn store: maillist,rn columns: [rn xtype: 'rownumberer', header: '', width: 30 ,rn xtype: 'checkcolumn', header: '', width: 30, dataIndex: 'Checked' ,rn header: '发件人', dataIndex: 'SenderTrueName', width: 100 ,rn header: '邮件主题', dataIndex: 'Title', width: 300 ,rn header: '发件时间', dataIndex: 'SendDate', width: 120 ,rn header: '附件数量', dataIndex: 'AttachCount', width: 55 ,rn header: '状态', dataIndex: 'Status', width: 45 ,rn header: 'id', dataIndex: 'Id', width: 20, hidden: true rn ],rn selModel: new Ext.selection.Model( mode: 'SIMPLE' ),rn //分页工具栏rn bbar: [ rn xtype: 'pagingtoolbar', rn pageSize: 18, rn store: maillist, rn displayInfo: true, rn displayMsg: '第 0 页/共1邮件 邮箱中总计邮件2封 '],rn listeners: rn //邮件表格事件rn rn );[/code]rnrn //后台返回的数据rn { Total:266,mails:["SenderTrueName":"111","SendDate":"\/Date(1361525528000)\/","Status":"111","Title":"11","Id":6423327,"SenderId":"12593","SenderTrueName":"1111","SendDate":"\/Date(1365919356000)\/","Status":"11","Title":"1111","Id":7176496,"SenderId":"44"]}
extjs oracle分页---Json转换
NULL 博文链接:https://zhangyinyou.iteye.com/blog/522942
Extjs 分页原理
在使用分页时,前天代码基本没错,但是分页就是不成功,而是一直是不变化,全部加载 原因是没有搞懂怎么分页的 Extjs分页是根据 store.load({params:{start:0,limit:10}}); 中start,limit这两个参数来进行分页的。 start表示开始记录数,limit表示一页的记录数。 当store第一次load的时候,start=0,limit=1...
extjs grid 分页问题
我在后台写好了方法在表现层调用,用store加载数据。可是我想实现grid的分页形式,不知道改如何做,有相关经验的朋友说说。如果有好的方法,请发邮件 liuxiaofeng@163.com
Extjs实现分页
extjsdemo.jsp: &amp;lt;%@ page language=&quot;java&quot; import=&quot;java.util.*&quot; pageEncoding=&quot;utf-8&quot;%&amp;gt; &amp;lt;% String path = request.getContextPath(); String basePath = request.getScheme()+&quot;://&quot;+request.getServ...
extjs grid 搜索 分页
[code=&quot;java&quot;] Ext.onReady(function(){ var ds = new Ext.data.Store({//这是数据源 proxy : new Ext.data.HttpProxy({url:'index.php?model=user&amp;action=list&amp;'}), reader: new Ext.da...
关于EXTJS分页的问题
我是刚学EXT的,有些东西不明白 所以问题可能会比较简单。rn我看了下DEMO里面的代码,然后我就看到他的数据源是从网站上面弄来的。我就把网上的数据复制了一下,rnCOPY到我电脑上面的一个文件中,然后把那个数据源的地址改为那个json文件的目录。但是却报错了。rn然后我发现读取数据的类弄错了 以前那个是从网上读取数据才用的 我就改成了rnproxy: new Ext.data.HttpProxy(rn url: 'test.json'rn )rn这个时候他就给我报个ext-base.js文件的错误。而且,后来我从网上看了很多例子。没当我把例子的代码复制下来rn然后我又再运行的时候又是报的这个错误。不知道是什么原因。希望大侠们帮我看下。rn下面是JS文件:rnrn/*!rn * Ext JS Library 3.3.1rn * Copyright(c) 2006-2010 Sencha Inc.rn * licensing@sencha.comrn * http://www.sencha.com/licensern */rnExt.onReady(function()rnrn // create the Data Storern var store = new Ext.data.JsonStore(rn root: 'topics',rn totalProperty: 'totalCount',rn idProperty: 'threadid',rn remoteSort: true,rnrn fields: [rn 'title', 'forumtitle', 'forumid', 'author',rn name: 'replycount', type: 'int',rn name: 'lastpost', mapping: 'lastpost', type: 'date', dateFormat: 'timestamp',rn 'lastposter', 'excerpt'rn ],rnrn // load using script tags for cross domain, if the data in on the same domain asrn // this page, an HttpProxy would be betterrn proxy: new Ext.data.HttpProxy(rn url: 'test.json'rn )rn );rn store.setDefaultSort('lastpost', 'desc');rnrnrn // pluggable rendersrn function renderTopic(value, p, record)rn return String.format(rn '01 Forum',rn value, record.data.forumtitle, record.id, record.data.forumid);rn rn function renderLast(value, p, r)rn return String.format('0 by 1', value.dateFormat('M j, Y, g:i a'), r.data['lastposter']);rn rnrn var grid = new Ext.grid.GridPanel(rn width:700,rn height:500,rn title:'ExtJS.com - Browse Forums',rn store: store,rn trackMouseOver:false,rn disableSelection:true,rn loadMask: true,rnrn // grid columnsrn columns:[rn id: 'topic', // id assigned so we can apply custom css (e.g. .x-grid-col-topic b color:#333 )rn header: "Topic",rn dataIndex: 'title',rn width: 420,rn renderer: renderTopic,rn sortable: truern ,rn header: "Author",rn dataIndex: 'author',rn width: 100,rn hidden: true,rn sortable: truern ,rn header: "Replies",rn dataIndex: 'replycount',rn width: 70,rn align: 'right',rn sortable: truern ,rn id: 'last',rn header: "Last Post",rn dataIndex: 'lastpost',rn width: 150,rn renderer: renderLast,rn sortable: truern ],rnrn // customize view configrn viewConfig: rn forceFit:true,rn enableRowBody:true,rn showPreview:true,rn getRowClass : function(record, rowIndex, p, store)rn if(this.showPreview)rn p.body = ' '+record.data.excerpt+'';rn return 'x-grid3-row-expanded';rn rn return 'x-grid3-row-collapsed';rn rn ,rnrn // paging bar on the bottomrn bbar: new Ext.PagingToolbar(rn pageSize: 25,rn store: store,rn displayInfo: true,rn displayMsg: 'Displaying topics 0 - 1 of 2',rn emptyMsg: "No topics to display",rn items:[rn '-', rn pressed: true,rn enableToggle:true,rn text: 'Show Preview',rn cls: 'x-btn-text-icon details',rn toggleHandler: function(btn, pressed)rn var view = grid.getView();rn view.showPreview = pressed;rn view.refresh();rn rn ]rn )rn );rnrn // render itrn grid.render('topic-grid');rnrn // trigger the data store loadrn store.load(params:start:0, limit:25);rn);rnrn补充说明下。为了方便,我刚开始把所有的JS文件html文件什么的都放到了一个文件夹里面。rn不过我感觉和这个应该是没有什么问题的。因为我的路径都没有错。rn如果有知道是怎么回事的.帮个忙。谢了.rnrn如果有简单点的分页例子.不吝啬的可以发我参考下得.不胜感激.
Extjs Grid 带参数分页
Ext.apply(Ext.getCmp('mygrid').store.proxy.extraParams, { timeStart:Ext.getCmp('timeStart').getRawValue(), timeEnd:Ext.getCmp('timeEnd').getRawValue() });  
Extjs分页动态传递参数
本身具有分页的功能了,但是想通过外部动态传递参数,但是通过load()只能显示一次,点击下一页还是使用的原始的查询.如何解决?通过baseParams然后将参数动态赋给他可行不
extjs 简单分页例子
extjs 简单分页例子。 只有js文件 后台 代码自己可以采用 觉得好的技术实现。
extjs 分页全选问题
extjs 中的grid分页后怎样处理全选问题。貌似只能选择当前页
ExtJS .net分页例子
ExtJS .net分页例子SqlConnection con = new SqlConnection(); con.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;//ConnectionString con.Open(); SqlCommand cmd = new SqlCommand(); cmd.Connection = con; string sql = "UPDATE TB_MOVIE SET " + e.Field + "=@" + e.Field + " WHERE ID_MOVIE=@ID_MOVIE"; cmd.CommandText = sql; cmd.Parameters.AddWithValue("@" + e.Field, e.Value); cmd.Parameters.AddWithValue("@ID_MOVIE", e.Record["ID_MOVIE"]); try { cmd.ExecuteNonQuery(); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.Message); }
ExtJS分页问题?
[code=JScript]rnExt.onReady(function ()rn var cm = new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),rn header:'序号',dataIndex:'id',sortable:true,rn header:'姓名',dataIndex:'name',rn header:'Email',dataIndex:'email',rn header:'性别',dataIndex:'sex',renderer:formatSex,rn header:'年龄',dataIndex:'age']);rn function formatSex(value) rn return value == '0'rn ? "男"rn : "女";rn rn var data = total:11,rn root:[id:'11',name:'zhangshenghong1',email:'zsh@sina.com',sex:'1',age:'11',rn id:'12',name:'zhangshenghong2',email:'zsh@sina.com',sex:'0',age:'12',rn id:'13',name:'zhangshenghong3',email:'zsh@sina.com',sex:'1',age:'13',rn id:'14',name:'zhangshenghong4',email:'zsh@sina.com',sex:'0',age:'14',rn id:'15',name:'zhangshenghong5',email:'zsh@sina.com',sex:'1',age:'13',rn id:'16',name:'zhangshenghong6',email:'zsh@sina.com',sex:'0',age:'14',rn id:'17',name:'zhangshenghong7',email:'zsh@sina.com',sex:'1',age:'13',rn id:'18',name:'zhangshenghong8',email:'zsh@sina.com',sex:'0',age:'14',rn id:'19',name:'zhangshenghong9',email:'zsh@sina.com',sex:'1',age:'13',rn id:'20',name:'zhangshenghong10',email:'zsh@sina.com',sex:'0',age:'14',rn id:'21',name:'zhangshenghong11',email:'zsh@sina.com',sex:'1',age:'15'];rn var store = new Ext.data.Store(rn proxy:new Ext.data.MemoryProxy(data),rn reader:new Ext.data.JsonReader(rn id:'id',rn totalProperty:'total',rn root:'root'rn ,[rn name:'id',rn name:'name',rn name:'email',rn name:'sex',rn name:'age'rn ])rn );rn var grid = new Ext.grid.GridPanel(rn cm:cm,rn store:store,rn title:'grid列表显示示例',rn width:600,rn height:350,rn loadMask:true,rn viewConfig:sortAscText:'正序',sortDescText:'逆序',columnsText:'列',rn tbar : new Ext.PagingToolbar(rn pageSize : 5,rn store : store,rn displayInfo : true,rn displayMsg : '显示第 0 条到第 1 条记录,共 2 条记录.',rn emptyMsg : '没有记录'rn ),rn bbar : new Ext.PagingToolbar(rn pageSize : 5,rn store : store,rn displayInfo : true,rn displayMsg : '显示第 0 条到第 1 条记录,共 2 条记录.',rn emptyMsg : '没有记录'rn )rn );rn grid.render(Ext.getBody());rn store.load(params:start:0, limit:5);rn);rn[/code]rn懂ExtJs的朋友帮我看看,为什么我的分页,老是数据全部显示出来了。
extjs grid分页问题
以下是我的代码,其中的grid总是显示5条数据(总共有五条)rnrnrnrnrnrn rn rn rn rn rnrnrn rnrn
extjs 树型分页组件
我们开发项目的时候,有的时候左边的树结点很多,虽然说有extjs有异步,但还是有结点下面有时长达500个以上,甚至更多,这个时候用分页可以解决这个问题
Extjs 前台分页(假分页)
/* This file is part of Ext JS 3.4 Copyright (c) 2011-2013 Sencha Inc Contact: http://www.sencha.com/contact GNU General Public License Usage This file may be used under the terms of the GNU Gener
Extjs grid 分页??
Extjs grid 数据源是xml 怎么分页?能给个列子吗??rn
extjs查询并分页?
[img=http://www.hd56.com/test/未命名.jpg][/img]rn我是这么做的rnclgzRecordStore = new Ext.data.GroupingStore(rn proxy: new Ext.data.HttpProxy(rn rn url: "DATA/Fhxx/clgz.aspx",rn method: "POST"rn ),rn reader: new Ext.data.JsonReader(rn rn fields: clgzRecordfields,rn root: "data",rn id: "fhqdh",rn totalProperty: "totalCount"rnrn ),rn //groupField: 'fcsj',rn sortInfo: field: 'fcsj', direction: "DESC" rnrn );rn//查询函数rnfunction SearchClgzRecord() rn var fcsjbegin = Ext.get('fcsj_begin').dom.value;rn var fcsjend = Ext.get('fcsj_end').dom.value;rn var sdzmccx = Ext.get('sdzmc_cx').dom.value;rn var zdzmccx = Ext.get('zdzmc_cx').dom.value;rn var clbhcx = Ext.get('clbh_cx').dom.value;//对应图中5个查询条件rn clgzRecordStore.reloadrn (rn params: start: 0, limit: pageSize, fcsj1: fcsjbegin,fcsj2:fcsjend,sdzmc:sdzmccx,zdzmc:zdzmccx,clbh:clbhcx rn );rn rnrn[color=#FF0000]clgz.aspx.cs文件[/color]rnrnstring starts = Request.Form["start"];rn string limits = Request.Form["limit"];rn DateTime fcsj1 = Convert.ToDateTime(Request.Form["fcsj1"].ToString());rn DateTime fcsj2 = Convert.ToDateTime(Request.Form["fcsj2"].ToString());rn string sdzmc = Request.Form["sdzmc"];rn string zdzmc = Request.Form["zdzmc"];rn string clbh = Request.Form["clbh"];rnrn if (starts != null && limits != null)rn rn int start = int.Parse(starts);rn int limit = int.Parse(limits);rn JSON = bll.GetClgzxxInfos(start, limit,fcsj1,fcsj2,sdzmc,zdzmc,clbh);rn rn elsern rn Response.Write("success:'false'");rn rnrnBLL层rnGetClgzxxInfos(int start, int limit, DateTime fcsj1,DateTime fcsj2,string sdzmc,string zdzmc,string clbh)rnrnDAL层rn//查询交易单信息并分页rnrn public DataSet GetClgzInfo(int start, int limit)rn rn tryrn rn [color=#FF0000]ds = sqlhelper.GetProDataSet("proc_clgz");//用的存储过程,如何将这么多的参数传进去[/color] rn return ds;rn rn catch (Exception)rn rn rn throw;rn rn rnrn谁给指导指导
extjs分页出问题
extjs pagingtoolbar分页的时候,如果后台返回数据格式:success:false,totalCount:0,rows:[],errorMessage:Get long time response fail 当success为false的时候显示如下:[img=https://img-bbs.csdn.net/upload/201411/27/1417073022_282247.png][/img] 我们暂且认为现在显示正确了,rn然后我们输入正确的条件查出数据:success:true,totalCount:1,rows:[executeTime:'2014-11-27 14:56:45',content:'..............']rn这时显示就出问题了:[img=https://img-bbs.csdn.net/upload/201411/27/1417073139_299863.png][/img] 后面的操作也跟着出现这个错误。请问有没有什么办法解决这个问题?
Extjs TreeStore+pagingToolbar 分页
NULL 博文链接:https://fuyu365-163-com.iteye.com/blog/1703697
Extjs grid分页1
NULL 博文链接:https://kohisa.iteye.com/blog/651399
ExtJs Json 分页
本实例相当简明:提供了对Struts2,Spring,Hiberntate3,Extjs和JSon的数据分页功能!希望能够对各位仁兄有帮助!
EXTJS分页全面分析
详细介绍了EXTJS中gridpanel分页技术的解析
extjs增删改查分页树
extjs增删改查分页树
Extjs无法接收显示Struts后台数据
不知道是不是前台的数据类型没配对 请大家帮忙看看rn这个链接是我发错版块了rnhttp://bbs.csdn.net/topics/390739350?page=1#post-397013073rn后台用的SSH,rn[img=https://img-bbs.csdn.net/upload/201403/23/1395564187_996090.png][/img]rnStruts代码:rn[code=java]rnpublic String execute()rn rn List roomlist=roomService.findAllRoom();rn ServletActionContext.getRequest().setAttribute("roomlist", roomlist);rn rn System.out.println("查找完毕");rn this.setTotalCount(roomlist.size());rn JSONArray array=JSONArray.fromObject(roomlist);rn this.jsonString="totalCount:"+this.getTotalCount()+",results:"+array.toString()+"";rn /*return SUCCESS;*/rn System.out.println("转换完毕");rnreturn SUCCESS;rn[/code]rnrnStruts.xmlrn[code=java]rn rn rn rn rn jsonString rn rn rn rn rn rnrn[/code]rnrnSpring就不贴了 运行只会断点能看到从数据库取出来的结果rn前台EXTJS 代码:rn[code=javascript]rnExt.onReady(function()rn /*Ext.define('Room',rn rn extend:'Ext.data.Model',rn fields:[rn name:'roomid',type:'int'rn ,rn rn name:'roomname',type:'string'rn ,rn rn name:'price',type:'int'rn ,rn rn name:'category',type:'string'rn ,rn name:'status',type:'int']rn );*/rn rn var rd = new Ext.data.JsonReader(rn //总记录数rn totalProperty: 'totalCount', rn //哪儿是数据的头,可以看action里面是怎么定义数据格式的,这里就是如何解析的 rn root: 'results', rn /* id:'roomid',*/rn //有那些字段呢?rn fields:[rn /* name:'roomid',rn name:'roomname',rn name:'price',rn name:'category',rn name:'status',*/rn //这里就是对room对象进行映射的地方 rn name:'roomid' ,mapping:'Room.roomid',type:'int',rn name:'roomname',mapping:'Room.roomname',type:'string',rn name:'price',mapping:'Room.price',type:'int',rn name:'category',mapping:'Room.category',type:'string',rn name:'status',mapping:'Room.status',type:'int'rn ]rn );rn rn var roomstore=Ext.create('Ext.data.Store',rn /*model:"Room",*/rn pagesize:2,rn proxy:rn type:'ajax',rn url:'listRoom.action',rn method:'POST',rn reader:rd,rn fields:["roomid","roomname","price","category","status"]rn /*new Ext.data.JsonReader( rn totalProperty:totalCount,rn root:results,rn id:'roomid'rn ,rn [rn name:'rooid',mapping:'roomid',rn name:'roomname',mapping:'roomname',rn name:'price',mapping:'price',rn name:'category',mapping:'category',rn name:'status',mapping:'status'rn ])*/rn rn /*autoLoad:true*/rn );rn roomstore.load();rn rn rn Ext.create('Ext.grid.Panel',rn title:'房间信息',rn store:roomstore,rn columns:[rn header:'房间号',dataIndex:'roomid',rn header:'房间名',dataIndex:'roomname',rn header:'价格',dataIndex:'price',rn header:'房间类型',dataIndex:'category',rn header:'房间状态',dataIndex:'status',renderer:function(value)rn if(value=='')rn return "满";rn rn elsern return "空闲";rn rn rn ],rn width:600,rn height:280,rn loadMask:rn msg:'数据加载中...'rn ,rn bbar:rn xtype:'pagingtoolbar',rn store:roomstore,rn displayInfo:truern ,rn renderTo:Ext.getBody()rn );rn);rn[/code]rnrn请大家帮忙看看为什么读取不到数据放到pannel上面
ExtJS的Grid无法服务器端的数据
[code=JScript]rnrnrnrn rn Show Datarn rn rn rnrn rnrnrn rnrnrnrn[/code]rn这是我js代码。。服务器端是一个Servletrnrn[code=Java]rnpackage com.ui.servlet;rnrnimport java.io.IOException;rnimport java.io.PrintWriter;rnimport java.util.List;rnrnimport javax.servlet.RequestDispatcher;rnimport javax.servlet.ServletException;rnimport javax.servlet.http.HttpServlet;rnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnimport javax.servlet.http.HttpSession;rnrnrnimport com.test.entity.MessageBean;rnimport com.test.entity.UserBean;rnimport com.ui.biz.MessageBiz;rnimport com.ui.biz.MessageBizImpl;rnimport com.ui.biz.UserBiz;rnimport com.ui.biz.UserBizImpl;rnrn/**rn * Servlet implementation class LoginServletrn */rnpublic class MessageServlet extends HttpServlet rn private static final long serialVersionUID = 1L;rn rn /**rn * @see HttpServlet#HttpServlet()rn */rn public MessageServlet() rn super();rn // TODO Auto-generated constructor stubrn rnrn /**rn * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)rn */rn protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException rn doPost(request,response);rn rnrn /**rn * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)rn */rn protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException rn request.setCharacterEncoding("UTF-8"); rn UserBiz userBiz=new UserBizImpl();rn MessageBiz messageBiz=new MessageBizImpl();rn List messageList=messageBiz.getMessage();rn String json="totalProperty:"+messageList.size()+",root:[\n";rn for(int i=0;i
相关热词 c#检测非法字符 c#双屏截图 c#中怎么关闭线程 c# 显示服务器上的图片 api嵌入窗口 c# c# 控制网页 c# encrypt c#微信网页版登录 c# login 居中 c# 考试软件