Header Controls

J

JemPower

Hi All,

Can someone help me with what I believe could be a simple answer. I've
created a datagrid, of which I have a template column containing checkboxes.

What I want to achieve is a checkbox in the header, so that when clicked,
checks all the checkboxes in the grid. I'm having a lot of difficulty even
placing the checkbox in the header!

Has anyone got an example of how I can do this please?

Many thanks,
 
C

Cathie

I had a similar problem and found it was easier using a image button,
swapping the image between checked and unchecked when clicked. This way you
can use "ItemCommand" to handle the event and if you place say "SelectAll"
in the header image button (check box) command name then it should be easy
to find. In your handler all you have to do is check for e.CommandName ==
"SelectAll" and cycle through your check boxes checking/unchecking as
required.

Cathie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top