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

  1. #1

    Default Datagrid Footer!

    Hi all,

    I am using a datagrid footer as a container for some data entry
    controls.
    Above the datagrid is another data entry point which needs to be filled
    out before prior to entering data in
    these controls.

    Q?
    How can i reference the controls in the datagrid footer so as to disable
    them.
    When i do a trace i can see the controls, just not sure how to access
    them using the datagrid api.

    Will I have to use the datagrids onItemDataBound event?

    I would prefer not to in this instance.

    Cheers,
    Adam




    Adam Knight Guest

  2. Similar Questions and Discussions

    1. DataGrid Footer Control
      How can I set TextBox1.Text to "something" from a button_click event? So outside of the datagrid (dg1) I have a button (button1). When I click...
    2. dropdownlist in footer of datagrid
      Hi all, I was wondering how and if it's possible to have two dropdownlist in the footer of a datagrid but populate the second one from the...
    3. Accessing datagrid footer
      There is probably a simple answer to this question - using code behind, in my a grid itemcommand event I need to reference cells in the footer row....
    4. Show datagrid footer
      hi, i have to present datagrid (header and footer) in time when i have not any records in dataset, do you have any mind how i can do this thank's...
    5. datagrid footer
      I'd like to know how to add a text box in the datagrid footer at runtime. Thanks.
  3. #2

    Default Re: Datagrid Footer!

    Adam,

    You'll have to use the ItemDataBound event here. The reason is, as the
    controls in the datagrid are rendered, each one can be accessed in the
    ItemDataBound event. You will need to handle the event, so that you can
    dynamically create the javascript code that will render the controls in the
    footer enabled, as you disable them in the loop itself. The function you
    create can be called from the "data entry points above the datagrid," with
    whatever logic you have. The call would simply enable them. You can use the
    Page.RegisterClientScriptBlock method to register the function on the page.

    I am already assuming that you know how to use the ItemDataBound event in
    this case. In case you don't ask, and we can post a small example for you.

    -S.M. Altaf
    [MVP - VB]


    --------------------------------------------------------------------------------
    All that glitters has a high refractive index. [url]www.mendhak.com[/url]
    "Adam Knight" <adam@pertrain.com.au> wrote in message
    news:eq6cSBosFHA.3088@TK2MSFTNGP12.phx.gbl...
    > Hi all,
    >
    > I am using a datagrid footer as a container for some data entry
    > controls.
    > Above the datagrid is another data entry point which needs to be filled
    > out before prior to entering data in
    > these controls.
    >
    > Q?
    > How can i reference the controls in the datagrid footer so as to
    > disable them.
    > When i do a trace i can see the controls, just not sure how to access
    > them using the datagrid api.
    >
    > Will I have to use the datagrids onItemDataBound event?
    >
    > I would prefer not to in this instance.
    >
    > Cheers,
    > Adam
    >
    >
    >
    >

    S.M. Altaf [MVP] 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