PDA

View Full Version : Question for new Ext.ux.grid.TableGrid



tlkshadow
6 Sep 2009, 6:54 AM
Hallo,

i am using new Ext.ux.grid.TableGrid. It is working fine. All Tables with the ID grid-the-table are now in the EXTJS look.

But now i have a Question for the pagination. Is there a way to implement it in Ext.ux.grid.TableGrid?

Shadow

Animal
6 Sep 2009, 7:08 AM
Paging is handled by the Store under the control of a PagingToolbar

The View has no knowledge of this.

tlkshadow
6 Sep 2009, 7:09 AM
So there is no way to create atomaticly the pagination?

Animal
6 Sep 2009, 7:10 AM
Well if by "automatic", you mean you just close your eyes reaaaaally tightly and wish for pagination then no.

tlkshadow
6 Sep 2009, 7:21 AM
I dont want to store with JsonStore. Are there other ways without JsonStore?

olvap
7 Sep 2009, 6:59 AM
but, what kind of data use yours table? if u dont want to use json, u could use xml.

tlkshadow
7 Sep 2009, 7:00 AM
PHP..

Condor
7 Sep 2009, 7:12 AM
PHP has very good JSON support. Why don't you want to use it?

tlkshadow
7 Sep 2009, 7:16 AM
Because i use new Ext.ux.grid.TableGrid("grid-the-table", {...
TableGrid gets the Data Automaticly from the Table.respectively it makes from the HTML Table the GRID Table . I dont have to set anything.. Thats why i ask if there is a pagination ext which works with TableGrid.

Condor
7 Sep 2009, 7:19 AM
You would need to modify TableGrid to make it use a PagingStore (http://www.extjs.com/forum/showthread.php?t=71532) instead of a normal Store.

tlkshadow
7 Sep 2009, 7:22 AM
But than i have to create for every Table a data.php.. That sucks..
Why EXT can not create pagination automaticly with the Data from the Table....

Condor
7 Sep 2009, 9:04 AM
You don't have to create a separate data php, you can also use inline data, e.g.

<script type="text/javascript">
var data = (...write PHP json object here...);
</script>
(but you still need to use PagingStore)

The only other option is server paging (required for very large datasets), but that indeed needs a data php url.