Filter on DataGrid

UI Components for JSF
Post Reply
smallya
Posts: 264
Joined: 19 Mar 2010, 19:22
Contact:

16 Jul 2010, 00:38

I am using the DataGrid component (great component !!) to display products in my shopping site which was earlier using DataTable. One thing which users loved in DataTable was the FilterBy option. DataGrid is missing that feature.

Anyone has implemented something like a Filter on DataGrid. Since DataGrid eagerly loads all the items, a Ajax based filter would give a great experience.

Cagatay, any plans for adding a filter to the DataGrid?

Although in DataTable the filter was at the column level in DataGrid, given the layout, it would be make sense to have just one filter for the entire dataGrid - Anyone else has any thoughts on this?

something like

<p:dataGrid id="productGrid" var="product" value="#{shoppingController.relatedProducts}" columns="4" rows="16"
paginator="true" paginatorAlwaysVisible="false" paginatorPosition="bottom"
filterBy="#{product.name}" filterByFieldSize="20" filterByPrompt="Filter Product">

and render a field above the datagrid
Netbeans 7.2| GlassFish 3.2 | PostgreSQL 9.1| MongoDB | Primefaces 3.4.2
_______________________________________________________________
Subraya Mallya
http://tinyhabit.com |http://twitter.com/tinyhabit

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

16 Jul 2010, 15:20

Hi,

Currently there are no plans to implement this as a built-in feature but I guess you can implement it manually by placing a inputtext and a filter button that filters your results and updates the datagrid.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 52 guests