XHR Grid Paging - Ext JS

本文讨论了如何在网格中实现分页功能,并通过XMLHttpRequest进行数据加载。此外,还探讨了在网格中添加按钮列的方法,以便执行删除或编辑操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Hello all,

After browsing the docs I haven't found an answer to my question, so I hope someone can help me out.

I want to have a grid with paging. On initialisation it loads on page of say 20 records only. After this the user can click paging buttons which use XHR to go back to the server and get other pages.

My question is: how would this be implemented?
Reply With Quote
  #2  
Old 02-27-2007, 11:48 AM
Default

Look at the paging example in the download. It should get you started. You will probably want to change the ScriptTagProxy to an HttpProxy though.
Reply With Quote
  #3  
Old 02-27-2007, 03:02 PM
Default

Yep, it works. I actually didn't think it could be that easy!

Second question: are there any examples of adding a button column to the grid - for example a button at the end that would delete or redirect to an edit page rather than contain data?
Reply With Quote
  #4  
Old 02-27-2007, 05:12 PM
Default

You could try a custom renderer, but I haven't yet looked into how to set up something like Ext Buttons this way, so that might not be possible.
Html works though, so an input tag should work.
Reply With Quote
  #5  
Old 02-27-2007, 05:42 PM
Default

Good plan, there is something similar in the paging example so I'll take that route. Thanks!
Reply With Quote
  #6  
Old 02-27-2007, 09:57 PM
Default

Depending on your application you could also do what I just did: put a general button/menu into the paging bar (like in the example) and have it act on selected rows.
Reply With Quote
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值