Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default Header Controls

    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 Guest

  2. Similar Questions and Discussions

    1. Control.Controls bug? Control's child controls missing at the run time.
      Hello, ..NET 1.1/VB.NET: I have a custom web control Public Class DatePicker Inherits Control Implements INamingContainer
    2. Why the properties of web user controls which inherted from my custom base UI controls MISSED?
      Why the properties of web user controls which inherted from my custom base UI controls MISSED? How should I to set enable?
    3. user controls: dynamiclly added child controls dont survive post back ?
      hi, i have some strange behaviour: i've created a web user control that add's some child controls (e.g: textbox, image buttons) to its control...
    4. Server Controls in header file
      Hi, I have files called header.ascx and footer.ascx which are included in pages by a class that inherits System.Web.UI.Page and overides OnInit....
    5. how to check controls that on datagrid header
      Anyone know why when I loop thru my datagrid item list I don't see my header or footer? I only see the item and alternatingitem types. The footer...
  3. #2

    Default Re: Header Controls

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


    "JemPower" <noemailspecified> wrote in message
    news:exEH$3fnDHA.2000@TK2MSFTNGP12.phx.gbl...
    > 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 Guest

  4. #3

    Default Re: Header Controls

    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$3fnDHA.2000@TK2MSFTNGP12.phx.gbl...
    > 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 Guest

  5. #4

    Default Re: Header Controls

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


    "Cathie" <someone@miscrosoft.com> wrote in message
    news:#xj9f7rnDHA.1672@TK2MSFTNGP09.phx.gbl...
    > 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$3fnDHA.2000@TK2MSFTNGP12.phx.gbl...
    > > 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 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139