简体   繁体   English

Symfony的Datagrid?

[英]Datagrid for Symfony?

I want to use a datagrid in one of my modules (Symfony 1.3, Propel ORM). 我想在我的一个模块(Symfony 1.3,Propel ORM)中使用数据网格。 I have spent a while searching the web, but everything I found expects a direct connection to teh db (mySQL) or is otherwise unsuitable. 我花了一段时间在网上搜索,但我发现的所有内容都需要直接连接到teh db(mySQL),否则就不合适了。

I found the datagrid plugin ( http://symfony.swisscenter.com/datagrid/exemples ), but the documentation/examples are in French - and I'm not too keen on learning French just for the sake of using the plugin - besides, if all the users are French speakers, then it will be difficult to get support/help if/when I do hget stuck. 我找到了datagrid插件( http://symfony.swisscenter.com/datagrid/exemples ),但是文档/示例都是法语的 - 我不太热衷于学习法语只是为了使用插件 - 除此之外,如果所有用户都是法语用户,那么如果/当我确实卡住时,将很难获得支持/帮助。

So my questions are: 所以我的问题是:

  1. Is anyone aware of a good (PHP) datagrid component that I can use with SF? 是否有人知道我可以使用SF的好(PHP)数据网格组件?
  2. Is anyone out there (English speaker), using the SF datagrid plugin? 是否有人(英语发言者),使用SF数据网格插件?

You can try a jQuery Plugin. 你可以试试一个jQuery插件。 Take a look at this collection 看看这个系列

I think jqGrid is the best among all listed above. 我认为jqGrid是上面列出的最好的。 Allows inline editing, adding rows, searching, sorting, column selection, column reordering, resizing, etc out-of-the-box. 允许内联编辑,添加行,搜索,排序,列选择,列重新排序,调整大小等开箱即用。 Data formats that can be used are datasource, JSON & XML. 可以使用的数据格式是数据源,JSON和XML。 Demos at: http://trirand.com/blog/jqgrid/jqgrid.html 演示: http//trirand.com/blog/jqgrid/jqgrid.html

You can try to use extJS Grid. 您可以尝试使用extJS Grid。 ExtJs is having well explained of documentation. ExtJs已经很好地解释了文档。 We have used this in our sf 1.4 project. 我们在sf 1.4项目中使用过它。

Create a widget that will import extjs Grid 创建一个将导入extjs Grid的小部件

You will have to create rest api for data for the grid. 您必须为网格数据创建rest api。 This can be easily achieved by using sfDoctrineRestGeneratorPlugin for doctrine. 通过将sfDoctrineRestGeneratorPlugin用于doctrine可以很容易地实现这一点。

I could not find a plugin for propel orm. 我找不到推进orm的插件。 Rest API can be easily created without a plugin 无需插件即可轻松创建Rest API

For Editable ExtJs 4 grid documentation refer http://docs.sencha.com/extjs/4.0.7/#!/example/restful/restful.html 有关可编辑的ExtJs 4网格文档,请参阅http://docs.sencha.com/extjs/4.0.7/#!/example/restful/restful.html

I recently went through the same thing and in the end we went with http://datatables.net/ . 我最近经历了同样的事情,最后我们去了http://datatables.net/ You can use it with or without rest and we've found it fits our needs pretty nice. 您可以在有或没有休息的情况下使用它,我们发现它非常适合我们的需求。

用jquery或Angular来javascrit方式会更好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM