Header Controls

Discussion in 'ASP .Net Datagrid Control' started by JemPower, Oct 29, 2003.

  1. JemPower

    JemPower Guest

    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,
    JemPower, Oct 29, 2003
    #1
    1. Advertising

  2. JemPower

    Josh Behl Guest

    If you go to www.datagridgirl.com you'll find a control there that she
    developed. It is pretty good.


    "JemPower" <noemailspecified> wrote in message
    news:exEH$...
    > 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,
    >
    >
    >
    Josh Behl, Oct 29, 2003
    #2
    1. Advertising

  3. JemPower

    Cathie Guest

    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

    "JemPower" <noemailspecified> wrote in message
    news:exEH$...
    > 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,
    >
    >
    >
    Cathie, Oct 30, 2003
    #3
  4. JemPower

    JemPower Guest

    Many thanks for the help, now sorted. Quite easy I guess when you think
    about it


    "Cathie" <> wrote in message
    news:#...
    > 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
    >
    > "JemPower" <noemailspecified> wrote in message
    > news:exEH$...
    > > 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,
    > >
    > >
    > >

    >
    >
    JemPower, Oct 30, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Newsgroup - Ann
    Replies:
    4
    Views:
    704
    lilburne
    Nov 2, 2003
  2. John Smith

    Header files included in header files

    John Smith, Jul 21, 2004, in forum: C Programming
    Replies:
    18
    Views:
    604
    Jack Klein
    Jul 24, 2004
  3. Replies:
    3
    Views:
    1,299
    Walter Roberson
    May 1, 2006
  4. Bit byte
    Replies:
    1
    Views:
    652
    benben
    Apr 19, 2006
  5. mlt
    Replies:
    2
    Views:
    833
    Jean-Marc Bourguet
    Jan 31, 2009
Loading...

Share This Page