Beginner Looking For Help

Ask a Question related to ASP.NET Building Controls, Design and Development.

  1. #1

    Default Beginner Looking For Help

    I am looking for some help with this problem I am experiencing.

    What I want to do, is extend the dataset, but include a button above it that
    I can click, and handle the postback of that click w/ in my custom server
    control code.

    So, my class inherits from the dataset, and has a button defined within it
    at the class level.

    I found that if wrote out the button with:
    me.cmdbutton.RenderControl(output)
    then the postback would not be caught.

    However, if I add the button to the controls collection like:
    Me.Controls.add(me.cmdbutton)

    then the click event is caught.

    However, I want to be able to place my button in a specific location,
    basically with the following HTML:

    TABLE
    TR
    TD
    MyButtonShouldGoHere
    /TD
    /TR
    TR
    TD
    DataSetShouldGoHere
    /TD
    /TR
    /TABLE

    I am able to do this easily when I render the control with the
    HTMLTextWriter (which seems to turn off the ability to catch the button click
    event), but I don't see a way to do it w/ the method of adding the button to
    the controls collection.

    So, can anyone tell me, what methodology I need to follow in order to extend
    the datagrid to add a button, but also keep the ability to put the button
    where I want it in the custom control heirarchy?
    cmay Guest

  2. Similar Questions and Discussions

    1. Beginner Please help!
      :o Hi all, I am new to the forum, and I was wondering if any of you could help me with this problem. I face myself trying for the first time in my...
    2. I am just a beginner !!!
      Hello I am just a beginner!!! I used DW to building a page with search function. If I give a search command, I only see de first (for example)...
    3. Please help a beginner
      Hi Folks, Wow flash is great but the features can be daunting at times. I used to use LiveMotion, but once I got Swift3D - I knew that Flash MX...
    4. Beginner needs help please
      Hi there all I have a problem with FlashXP - hoping someone might be able to help. I have a button which I would like to appear only on mouse...
    5. Beginner SLR
      I recently made the same transition from a Oly C-3000z which when new was more than I paid for my whole 35mm setup, and I bought a N75 Nikon....
  3. #2

    Default Re: Beginner Looking For Help

    Are you implementing the INamingContainer interface? And have you
    tried overriding CreateChildControls() instead of worrying about
    rendering?

    Matt Guest

  4. #3

    Default Re: Beginner Looking For Help

    The short answer to your questions are:
    1) No
    2) No

    I guess that establishes that I am not going about this the right way.
    Do you know of any examples out there that use the
    INamingContainer/CreateChildControls to achieve what I am looking for?
    A quick google search turned up a lot about creating template controls,
    but that doesn't seem to be what I want.

    I'm guessing that if I were to override the createChildcontrols, I
    wouldn't inherit from the datagrid but rather add a datagrid to my
    control via the CreatechildControls?

    If I were to still inherit from the datagrid, and I used the
    CreateChildControls, where would those controls endup in relation to
    the datagrid itself?

    cmay 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