Ask a Question related to ASP.NET Building Controls, Design and Development.
-
cmay #1
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
-
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... -
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)... -
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... -
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... -
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.... -
Matt #2
Re: Beginner Looking For Help
Are you implementing the INamingContainer interface? And have you
tried overriding CreateChildControls() instead of worrying about
rendering?
Matt Guest
-
cmay #3
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



Reply With Quote

