This post utilizes the checkbox item renderer from the previous post.
Here I have applied the same generic checkbox renderer approach to use as a headerRenderer on every DataGridColumn.
Again – as in the previous post, you do not have to change anything.
Just drop the CheckBoxHeaderRenderer class into your headerRenderer property of any data grid column – it will take of itself!
Marking the check box in the header will set all the corresponding data provider values to be true – thus marking all checkboxes in the item renderer.
Unmarking it will do the opposite.
It works in both ways!
If all the checkboxes in all the item renderer (on this column only) are marked – the checkbox at the header will be marked too.
In the other case – not all the checkboxes are marked – the header checkbox will update itself to be not marked.
Demo is here (right click for source)
Source is here
Posted by shemesh
Posted by shemesh 