Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SelectAll checkbox in header column

 
Charles Ben
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Im using datatable and i got a requirement to have a checkbox in the header section along with the label "Action"
on select it should select all the checkboxes under that column and on uncheck it should
uncheck all the selected checkboxes below ..

Could someone suggest the approach to be taken for this scenario.
is it possible to add another checkbox alongside header label under same facet tag?
 
Rajneesh Kumar Rajput
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it is perfectly valid you can use panelGrid inside the facet and have the header checkbox along with the header label.



simply you can java script to select and un select all the other rows checkboxes.
 
Charles Ben
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rajneesh

I made the header column as Command link and called the action to do the select/deselect functionality in backing bean class.
Javascript was slowing down when the data was more in datatable and so went wth java implementation.



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic