C
cmay
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?
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?