Hi ,
do you plan on adding pulldowns as a filter type(similar to excel)? That would be nice.
What I did so far is creating pulldown outside of the table. On change I call PrimeFaces.widget.DataTableUtils.filterColumn('tableName', this.value, 'columnName');
Filters outside of data table has of course some more advantages like keeping the value between different requests.
Regarding my current solution is there any way to get the full name of the column? Eg. with <p:column id="myColumn"> the column name was yui-dt0-myColumn.
Thanks
Rene
Filter variations for datatable
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Hi Rene,
Yes, we were talking about this recently, this is something that'll be added along with ajax filter feature soon.
Column id has to be unique per datatable, if there're two datatables on same page then myColumn would be duplicate so we use the autogenerated yui datatable columns here.
So in summary, filtering will be revised very soon and custom controls/ajax filtering will be implemented.
Yes, we were talking about this recently, this is something that'll be added along with ajax filter feature soon.
Column id has to be unique per datatable, if there're two datatables on same page then myColumn would be duplicate so we use the autogenerated yui datatable columns here.
So in summary, filtering will be revised very soon and custom controls/ajax filtering will be implemented.
-
- Posts: 56
- Joined: 19 Oct 2009, 15:56
Hi Cagatay,
that sounds great. Unfortunately I dont know how to apply a filter with PrimeFaces.widget.DataTableUtils.filterColumn on page load, or to be more exact on data table load. Could you think of any way how I could achieve that? I tried with <body onLoad...> but that doesnt work in IE. It looks like that IE fires the onLoad event before the DataTable is rendered.
Cheers
Rene
that sounds great. Unfortunately I dont know how to apply a filter with PrimeFaces.widget.DataTableUtils.filterColumn on page load, or to be more exact on data table load. Could you think of any way how I could achieve that? I tried with <body onLoad...> but that doesnt work in IE. It looks like that IE fires the onLoad event before the DataTable is rendered.
Cheers
Rene
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
I think you can achieve it easily with jquery as well instead of body onload, this approach is cross browser.
jQuery(document).ready(function() {
//your code
});
jQuery is added by PrimeFaces if you have datatable in page.
jQuery(document).ready(function() {
//your code
});
jQuery is added by PrimeFaces if you have datatable in page.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 22 guests