Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Composite custom controls events

Reply
Thread Tools

Composite custom controls events

 
 
apple
Guest
Posts: n/a
 
      02-07-2004
sorry, I send copy to webcontrols, and then I find a more relevant group,
please help me

I create a simple custom tabular control, and try for place set of controls
inside its tab tags.
<helix:tabcontrol id="Tab1" runat="server" width="100%">
<helix:tab header="Users">other controls</helix:tab>
<helix:tab header="Roles">other controls</helix:tab>
<helix:tab header="Resources">other controls</helix:tab>
</helix:tabcontrol>
Control tree with all nested controls will be created fine, but postback
events don't firing if I place other controls inside helix:tab tags, for
example the datagrid paging don't work. And databinding work correct. Why?
How I can process the postback from nested controls.

thank


 
Reply With Quote
 
 
 
 
Alessandro Zifiglio
Guest
Posts: n/a
 
      02-07-2004
you must override the onbubbleEvent method in your helixtab template and
send it up to the container.

Event bubbling is what you want. Look in the docs for more. This is an old
post where a bit was discussed. Also do not forget to implement
INamingContainer in helixTab.

Follow up on this post :

http://groups.google.com/groups?hl=e...oogle%2BSearch

Message 13 onwards we got into event bubbling. Let me know if your stuck.
"apple" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> sorry, I send copy to webcontrols, and then I find a more relevant group,
> please help me
>
> I create a simple custom tabular control, and try for place set of

controls
> inside its tab tags.
> <helix:tabcontrol id="Tab1" runat="server" width="100%">
> <helix:tab header="Users">other controls</helix:tab>
> <helix:tab header="Roles">other controls</helix:tab>
> <helix:tab header="Resources">other controls</helix:tab>
> </helix:tabcontrol>
> Control tree with all nested controls will be created fine, but postback
> events don't firing if I place other controls inside helix:tab tags, for
> example the datagrid paging don't work. And databinding work correct. Why?
> How I can process the postback from nested controls.
>
> thank
>
>



 
Reply With Quote
 
 
 
 
apple
Guest
Posts: n/a
 
      02-07-2004
Thank Alessandro for your reply, I think already about bubbling, and I have
a lot of "theoretical" questions for you or somebody else.
If I understand correctly, in my controls hierarchy all controls inside
separate tabs fire events, these events yet not propagate up through the
control hierarchy and the page that finally holds my tab control don't know
about these internal events. So if I place nested datagrid handler's inside
page class, any level of nested control hierarchy may probably block event
bubbling, because by default, an event that initiates bubbling is
automatically bubbled up through the control hierarchy, as "we can see from
the definition of the RaiseBubbleEvent method and the default implementation
of OnBubbleEvent" in Control class. I read this in a book Developing
Microsoft ASP.NET Server Controls and Components. Very likely this
"blocking" level is a collection of tabs which inherits CollectionBase an
don't have default bubbling features. Can you comment these thoughts?




"Alessandro Zifiglio" <(E-Mail Removed)> wrote in
message news:kEaVb.4637$(E-Mail Removed)...
> you must override the onbubbleEvent method in your helixtab template and
> send it up to the container.
>
> Event bubbling is what you want. Look in the docs for more. This is an old
> post where a bit was discussed. Also do not forget to implement
> INamingContainer in helixTab.
>
> Follow up on this post :
>
>

http://groups.google.com/groups?hl=e...oogle%2BSearch
>
> Message 13 onwards we got into event bubbling. Let me know if your stuck.
> "apple" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > sorry, I send copy to webcontrols, and then I find a more relevant

group,
> > please help me
> >
> > I create a simple custom tabular control, and try for place set of

> controls
> > inside its tab tags.
> > <helix:tabcontrol id="Tab1" runat="server" width="100%">
> > <helix:tab header="Users">other controls</helix:tab>
> > <helix:tab header="Roles">other controls</helix:tab>
> > <helix:tab header="Resources">other controls</helix:tab>
> > </helix:tabcontrol>
> > Control tree with all nested controls will be created fine, but postback
> > events don't firing if I place other controls inside helix:tab tags, for
> > example the datagrid paging don't work. And databinding work correct.

Why?
> > How I can process the postback from nested controls.
> >
> > thank
> >
> >

>
>



 
Reply With Quote
 
Alessandro Zifiglio
Guest
Posts: n/a
 
      02-08-2004
Apple, actually the events fire in your Template helixTab, however the idea
is to trap this event and send it up. I Understand your concern about the
dataGrid control, which is a Templated Control in itself, but you could
actually trap these events and send them up, even if in my personal opinion
I find this not to be very smart. Reason being that you could have any
controls in your template not just a datagrid and it makes it very hard to
keep trapping and exposing these events in your container, and in the end
you will end up with a cluttered control that exposes events of controls
that are not directly part of the control but are nested controls. This is
ok for normal click events etc but for controls like the the datagrid you
got --onitemcreated --onitemdatabound and many others, for whom you would
have to trap the event individually and then expose it to the consumers of
your custom control. For templated controls the idea is to provide one
handler for specific events, and because most controls have a click event, i
think you should bubble this up and expose one handler for all click events
and then let the end user distinguish every click by checking the
ArgumentName attribute for the buttons they defined etc.

As for controls like the dataGrid an easier way to workaround would be to
add your datagrid to a UserControl and then add the UserControl as a
childControl in your Template. This is because a usercontrol has its own
code-behind class where you can code, and use your dataGrids event handlers
like you would on any page. If you went this route then you wont need to
bother with the hassles of bubbling events for Templated Controls like the
DataGrid --DataList --Repeater etc which in turn bubble events for their
ChildControls


"apple" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thank Alessandro for your reply, I think already about bubbling, and I

have
> a lot of "theoretical" questions for you or somebody else.
> If I understand correctly, in my controls hierarchy all controls inside
> separate tabs fire events, these events yet not propagate up through the
> control hierarchy and the page that finally holds my tab control don't

know
> about these internal events. So if I place nested datagrid handler's

inside
> page class, any level of nested control hierarchy may probably block event
> bubbling, because by default, an event that initiates bubbling is
> automatically bubbled up through the control hierarchy, as "we can see

from
> the definition of the RaiseBubbleEvent method and the default

implementation
> of OnBubbleEvent" in Control class. I read this in a book Developing
> Microsoft ASP.NET Server Controls and Components. Very likely this
> "blocking" level is a collection of tabs which inherits CollectionBase an
> don't have default bubbling features. Can you comment these thoughts?
>
>
>
>
> "Alessandro Zifiglio" <(E-Mail Removed)> wrote in
> message news:kEaVb.4637$(E-Mail Removed)...
> > you must override the onbubbleEvent method in your helixtab template and
> > send it up to the container.
> >
> > Event bubbling is what you want. Look in the docs for more. This is an

old
> > post where a bit was discussed. Also do not forget to implement
> > INamingContainer in helixTab.
> >
> > Follow up on this post :
> >
> >

>

http://groups.google.com/groups?hl=e...oogle%2BSearch
> >
> > Message 13 onwards we got into event bubbling. Let me know if your

stuck.
> > "apple" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > sorry, I send copy to webcontrols, and then I find a more relevant

> group,
> > > please help me
> > >
> > > I create a simple custom tabular control, and try for place set of

> > controls
> > > inside its tab tags.
> > > <helix:tabcontrol id="Tab1" runat="server" width="100%">
> > > <helix:tab header="Users">other controls</helix:tab>
> > > <helix:tab header="Roles">other controls</helix:tab>
> > > <helix:tab header="Resources">other controls</helix:tab>
> > > </helix:tabcontrol>
> > > Control tree with all nested controls will be created fine, but

postback
> > > events don't firing if I place other controls inside helix:tab tags,

for
> > > example the datagrid paging don't work. And databinding work correct.

> Why?
> > > How I can process the postback from nested controls.
> > >
> > > thank
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Alessandro Zifiglio
Guest
Posts: n/a
 
      02-08-2004
Apple, in my last post i said that you could bubble up the events for the
datagrid control but now that I think of it, bubbling up the dataGrid
controls events is not the real problem but trying to distinguish which
dataGrid control fired the event as there is no way you can pass an
identifier like we could have done through the CommandArgument or
CommandName properties exposed by contros that postback like the button
Control etc.

So what you need to do is have the consumers of your custom control wrap
their datagrid control and the like within a usercontrol and add the
usercontrol and not the dataGrid directly, like I had mentioned in my
previous post.


"Alessandro Zifiglio" <(E-Mail Removed)> wrote in
message news:0ioVb.4811$(E-Mail Removed)...
> Apple, actually the events fire in your Template helixTab, however the

idea
> is to trap this event and send it up. I Understand your concern about the
> dataGrid control, which is a Templated Control in itself, but you could
> actually trap these events and send them up, even if in my personal

opinion
> I find this not to be very smart. Reason being that you could have any
> controls in your template not just a datagrid and it makes it very hard to
> keep trapping and exposing these events in your container, and in the end
> you will end up with a cluttered control that exposes events of controls
> that are not directly part of the control but are nested controls. This is
> ok for normal click events etc but for controls like the the datagrid you
> got --onitemcreated --onitemdatabound and many others, for whom you would
> have to trap the event individually and then expose it to the consumers of
> your custom control. For templated controls the idea is to provide one
> handler for specific events, and because most controls have a click event,

i
> think you should bubble this up and expose one handler for all click

events
> and then let the end user distinguish every click by checking the
> ArgumentName attribute for the buttons they defined etc.
>
> As for controls like the dataGrid an easier way to workaround would be to
> add your datagrid to a UserControl and then add the UserControl as a
> childControl in your Template. This is because a usercontrol has its own
> code-behind class where you can code, and use your dataGrids event

handlers
> like you would on any page. If you went this route then you wont need to
> bother with the hassles of bubbling events for Templated Controls like the
> DataGrid --DataList --Repeater etc which in turn bubble events for their
> ChildControls
>
>
> "apple" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Thank Alessandro for your reply, I think already about bubbling, and I

> have
> > a lot of "theoretical" questions for you or somebody else.
> > If I understand correctly, in my controls hierarchy all controls inside
> > separate tabs fire events, these events yet not propagate up through the
> > control hierarchy and the page that finally holds my tab control don't

> know
> > about these internal events. So if I place nested datagrid handler's

> inside
> > page class, any level of nested control hierarchy may probably block

event
> > bubbling, because by default, an event that initiates bubbling is
> > automatically bubbled up through the control hierarchy, as "we can see

> from
> > the definition of the RaiseBubbleEvent method and the default

> implementation
> > of OnBubbleEvent" in Control class. I read this in a book Developing
> > Microsoft ASP.NET Server Controls and Components. Very likely this
> > "blocking" level is a collection of tabs which inherits CollectionBase

an
> > don't have default bubbling features. Can you comment these thoughts?
> >
> >
> >
> >
> > "Alessandro Zifiglio" <(E-Mail Removed)> wrote in
> > message news:kEaVb.4637$(E-Mail Removed)...
> > > you must override the onbubbleEvent method in your helixtab template

and
> > > send it up to the container.
> > >
> > > Event bubbling is what you want. Look in the docs for more. This is an

> old
> > > post where a bit was discussed. Also do not forget to implement
> > > INamingContainer in helixTab.
> > >
> > > Follow up on this post :
> > >
> > >

> >

>

http://groups.google.com/groups?hl=e...oogle%2BSearch
> > >
> > > Message 13 onwards we got into event bubbling. Let me know if your

> stuck.
> > > "apple" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > sorry, I send copy to webcontrols, and then I find a more relevant

> > group,
> > > > please help me
> > > >
> > > > I create a simple custom tabular control, and try for place set of
> > > controls
> > > > inside its tab tags.
> > > > <helix:tabcontrol id="Tab1" runat="server" width="100%">
> > > > <helix:tab header="Users">other controls</helix:tab>
> > > > <helix:tab header="Roles">other controls</helix:tab>
> > > > <helix:tab header="Resources">other controls</helix:tab>
> > > > </helix:tabcontrol>
> > > > Control tree with all nested controls will be created fine, but

> postback
> > > > events don't firing if I place other controls inside helix:tab tags,

> for
> > > > example the datagrid paging don't work. And databinding work

correct.
> > Why?
> > > > How I can process the postback from nested controls.
> > > >
> > > > thank
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
apple
Guest
Posts: n/a
 
      02-09-2004
Alessandro, thanks
only one way we have as a result for my simple tab control - bubbling?
it is of course not convenient, because I don't know what controls may
contain tab container...






"Alessandro Zifiglio" <(E-Mail Removed)> wrote in
message news:7msVb.4918$(E-Mail Removed)...
> Apple, in my last post i said that you could bubble up the events for the
> datagrid control but now that I think of it, bubbling up the dataGrid
> controls events is not the real problem but trying to distinguish which
> dataGrid control fired the event as there is no way you can pass an
> identifier like we could have done through the CommandArgument or
> CommandName properties exposed by contros that postback like the button
> Control etc.
>
> So what you need to do is have the consumers of your custom control wrap
> their datagrid control and the like within a usercontrol and add the
> usercontrol and not the dataGrid directly, like I had mentioned in my
> previous post.
>
>
> "Alessandro Zifiglio" <(E-Mail Removed)> wrote in
> message news:0ioVb.4811$(E-Mail Removed)...
> > Apple, actually the events fire in your Template helixTab, however the

> idea
> > is to trap this event and send it up. I Understand your concern about

the
> > dataGrid control, which is a Templated Control in itself, but you could
> > actually trap these events and send them up, even if in my personal

> opinion
> > I find this not to be very smart. Reason being that you could have any
> > controls in your template not just a datagrid and it makes it very hard

to
> > keep trapping and exposing these events in your container, and in the

end
> > you will end up with a cluttered control that exposes events of controls
> > that are not directly part of the control but are nested controls. This

is
> > ok for normal click events etc but for controls like the the datagrid

you
> > got --onitemcreated --onitemdatabound and many others, for whom you

would
> > have to trap the event individually and then expose it to the consumers

of
> > your custom control. For templated controls the idea is to provide one
> > handler for specific events, and because most controls have a click

event,
> i
> > think you should bubble this up and expose one handler for all click

> events
> > and then let the end user distinguish every click by checking the
> > ArgumentName attribute for the buttons they defined etc.
> >
> > As for controls like the dataGrid an easier way to workaround would be

to
> > add your datagrid to a UserControl and then add the UserControl as a
> > childControl in your Template. This is because a usercontrol has its own
> > code-behind class where you can code, and use your dataGrids event

> handlers
> > like you would on any page. If you went this route then you wont need to
> > bother with the hassles of bubbling events for Templated Controls like

the
> > DataGrid --DataList --Repeater etc which in turn bubble events for their
> > ChildControls
> >
> >
> > "apple" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Thank Alessandro for your reply, I think already about bubbling, and I

> > have
> > > a lot of "theoretical" questions for you or somebody else.
> > > If I understand correctly, in my controls hierarchy all controls

inside
> > > separate tabs fire events, these events yet not propagate up through

the
> > > control hierarchy and the page that finally holds my tab control don't

> > know
> > > about these internal events. So if I place nested datagrid handler's

> > inside
> > > page class, any level of nested control hierarchy may probably block

> event
> > > bubbling, because by default, an event that initiates bubbling is
> > > automatically bubbled up through the control hierarchy, as "we can see

> > from
> > > the definition of the RaiseBubbleEvent method and the default

> > implementation
> > > of OnBubbleEvent" in Control class. I read this in a book Developing
> > > Microsoft ASP.NET Server Controls and Components. Very likely this
> > > "blocking" level is a collection of tabs which inherits CollectionBase

> an
> > > don't have default bubbling features. Can you comment these thoughts?
> > >
> > >
> > >
> > >
> > > "Alessandro Zifiglio" <(E-Mail Removed)> wrote

in
> > > message news:kEaVb.4637$(E-Mail Removed)...
> > > > you must override the onbubbleEvent method in your helixtab template

> and
> > > > send it up to the container.
> > > >
> > > > Event bubbling is what you want. Look in the docs for more. This is

an
> > old
> > > > post where a bit was discussed. Also do not forget to implement
> > > > INamingContainer in helixTab.
> > > >
> > > > Follow up on this post :
> > > >
> > > >
> > >

> >

>

http://groups.google.com/groups?hl=e...oogle%2BSearch
> > > >
> > > > Message 13 onwards we got into event bubbling. Let me know if your

> > stuck.
> > > > "apple" <(E-Mail Removed)> wrote in message
> > > > news:(E-Mail Removed)...
> > > > > sorry, I send copy to webcontrols, and then I find a more relevant
> > > group,
> > > > > please help me
> > > > >
> > > > > I create a simple custom tabular control, and try for place set of
> > > > controls
> > > > > inside its tab tags.
> > > > > <helix:tabcontrol id="Tab1" runat="server" width="100%">
> > > > > <helix:tab header="Users">other controls</helix:tab>
> > > > > <helix:tab header="Roles">other controls</helix:tab>
> > > > > <helix:tab header="Resources">other controls</helix:tab>
> > > > > </helix:tabcontrol>
> > > > > Control tree with all nested controls will be created fine, but

> > postback
> > > > > events don't firing if I place other controls inside helix:tab

tags,
> > for
> > > > > example the datagrid paging don't work. And databinding work

> correct.
> > > Why?
> > > > > How I can process the postback from nested controls.
> > > > >
> > > > > thank
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Alessandro Zifiglio
Guest
Posts: n/a
 
      02-09-2004
Bubbling is great and you dont need to know what control is contained ahead
of time, but what events you want to trap and bubble up. Once bubbled, you
want to expose a handler for that specific event. What you dont know is
which control fired the event, because you can have 10 buttons in your
template and every one of them can fire a click event. Question : So, how do
we know who fired this event if we have one generic click event handler
exposed by our control ?
Answer : For every button we use the CommandName property and set an
identifier here : like button1.CommandName = "Button1"

Now in the click event handler we expose to end users of our control, or
even in the container of our template, which will fire everytime a click
event occurs in our template, is to check in this manner :

Sub MyCustomControl_Click(sender As Object, e As MyControl.CommandEventArgs)
if e.CommandName = "Button1" then
'Take action because button1 was clicked.
End sub
End Sub 'MyCustomControl_Click


This is possible because the CommandEventArgs object contains data about the
Command event that can be accessed in the event handler. The dataGrid
control does not expose the CommandEventArgs object making it impossible to
pass any data and hence we got no identifier, when for example, an
onItemDataBound event is fired. If you had one dataGrid control no problem.
If you had multiple datagrids in your template then you wont know how to
differentiate btw dataGrids. Also note that this is only my own personal
reasoning and I am speaking theorically.

It makes sense to me to tell consumers of your control that if they wanted
to nest datagrids, to do this wrapping them within usercontrols whereas to
nesting the grid directly and not try and bubble up events for templated
controls like the dataGrid. This will also give them greater control on what
is going on without limiting them.




"apple" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Alessandro, thanks
> only one way we have as a result for my simple tab control - bubbling?
> it is of course not convenient, because I don't know what controls may
> contain tab container...
>
>
>
>
>
>
> "Alessandro Zifiglio" <(E-Mail Removed)> wrote in
> message news:7msVb.4918$(E-Mail Removed)...
> > Apple, in my last post i said that you could bubble up the events for

the
> > datagrid control but now that I think of it, bubbling up the dataGrid
> > controls events is not the real problem but trying to distinguish which
> > dataGrid control fired the event as there is no way you can pass an
> > identifier like we could have done through the CommandArgument or
> > CommandName properties exposed by contros that postback like the button
> > Control etc.
> >
> > So what you need to do is have the consumers of your custom control wrap
> > their datagrid control and the like within a usercontrol and add the
> > usercontrol and not the dataGrid directly, like I had mentioned in my
> > previous post.
> >
> >
> > "Alessandro Zifiglio" <(E-Mail Removed)> wrote in
> > message news:0ioVb.4811$(E-Mail Removed)...
> > > Apple, actually the events fire in your Template helixTab, however the

> > idea
> > > is to trap this event and send it up. I Understand your concern about

> the
> > > dataGrid control, which is a Templated Control in itself, but you

could
> > > actually trap these events and send them up, even if in my personal

> > opinion
> > > I find this not to be very smart. Reason being that you could have any
> > > controls in your template not just a datagrid and it makes it very

hard
> to
> > > keep trapping and exposing these events in your container, and in the

> end
> > > you will end up with a cluttered control that exposes events of

controls
> > > that are not directly part of the control but are nested controls.

This
> is
> > > ok for normal click events etc but for controls like the the datagrid

> you
> > > got --onitemcreated --onitemdatabound and many others, for whom you

> would
> > > have to trap the event individually and then expose it to the

consumers
> of
> > > your custom control. For templated controls the idea is to provide one
> > > handler for specific events, and because most controls have a click

> event,
> > i
> > > think you should bubble this up and expose one handler for all click

> > events
> > > and then let the end user distinguish every click by checking the
> > > ArgumentName attribute for the buttons they defined etc.
> > >
> > > As for controls like the dataGrid an easier way to workaround would be

> to
> > > add your datagrid to a UserControl and then add the UserControl as a
> > > childControl in your Template. This is because a usercontrol has its

own
> > > code-behind class where you can code, and use your dataGrids event

> > handlers
> > > like you would on any page. If you went this route then you wont need

to
> > > bother with the hassles of bubbling events for Templated Controls like

> the
> > > DataGrid --DataList --Repeater etc which in turn bubble events for

their
> > > ChildControls
> > >
> > >
> > > "apple" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > Thank Alessandro for your reply, I think already about bubbling, and

I
> > > have
> > > > a lot of "theoretical" questions for you or somebody else.
> > > > If I understand correctly, in my controls hierarchy all controls

> inside
> > > > separate tabs fire events, these events yet not propagate up through

> the
> > > > control hierarchy and the page that finally holds my tab control

don't
> > > know
> > > > about these internal events. So if I place nested datagrid handler's
> > > inside
> > > > page class, any level of nested control hierarchy may probably block

> > event
> > > > bubbling, because by default, an event that initiates bubbling is
> > > > automatically bubbled up through the control hierarchy, as "we can

see
> > > from
> > > > the definition of the RaiseBubbleEvent method and the default
> > > implementation
> > > > of OnBubbleEvent" in Control class. I read this in a book Developing
> > > > Microsoft ASP.NET Server Controls and Components. Very likely this
> > > > "blocking" level is a collection of tabs which inherits

CollectionBase
> > an
> > > > don't have default bubbling features. Can you comment these

thoughts?
> > > >
> > > >
> > > >
> > > >
> > > > "Alessandro Zifiglio" <(E-Mail Removed)> wrote

> in
> > > > message news:kEaVb.4637$(E-Mail Removed)...
> > > > > you must override the onbubbleEvent method in your helixtab

template
> > and
> > > > > send it up to the container.
> > > > >
> > > > > Event bubbling is what you want. Look in the docs for more. This

is
> an
> > > old
> > > > > post where a bit was discussed. Also do not forget to implement
> > > > > INamingContainer in helixTab.
> > > > >
> > > > > Follow up on this post :
> > > > >
> > > > >
> > > >
> > >

> >

>

http://groups.google.com/groups?hl=e...oogle%2BSearch
> > > > >
> > > > > Message 13 onwards we got into event bubbling. Let me know if your
> > > stuck.
> > > > > "apple" <(E-Mail Removed)> wrote in message
> > > > > news:(E-Mail Removed)...
> > > > > > sorry, I send copy to webcontrols, and then I find a more

relevant
> > > > group,
> > > > > > please help me
> > > > > >
> > > > > > I create a simple custom tabular control, and try for place set

of
> > > > > controls
> > > > > > inside its tab tags.
> > > > > > <helix:tabcontrol id="Tab1" runat="server" width="100%">
> > > > > > <helix:tab header="Users">other controls</helix:tab>
> > > > > > <helix:tab header="Roles">other controls</helix:tab>
> > > > > > <helix:tab header="Resources">other controls</helix:tab>
> > > > > > </helix:tabcontrol>
> > > > > > Control tree with all nested controls will be created fine, but
> > > postback
> > > > > > events don't firing if I place other controls inside helix:tab

> tags,
> > > for
> > > > > > example the datagrid paging don't work. And databinding work

> > correct.
> > > > Why?
> > > > > > How I can process the postback from nested controls.
> > > > > >
> > > > > > thank
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Alessandro Zifiglio
Guest
Posts: n/a
 
      02-09-2004
oops, typo error : its "End If" and not "End sub" ;P

Sub MyCustomControl_Click(sender As Object, e As MyControl.CommandEventArgs)
if e.CommandName = "Button1" then
'Take action because button1 was clicked.
End If
End Sub 'MyCustomControl_Click
"Alessandro Zifiglio" <(E-Mail Removed)> wrote in
message news:ReMVb.5172$(E-Mail Removed)...
> Bubbling is great and you dont need to know what control is contained

ahead
> of time, but what events you want to trap and bubble up. Once bubbled, you
> want to expose a handler for that specific event. What you dont know is
> which control fired the event, because you can have 10 buttons in your
> template and every one of them can fire a click event. Question : So, how

do
> we know who fired this event if we have one generic click event handler
> exposed by our control ?
> Answer : For every button we use the CommandName property and set an
> identifier here : like button1.CommandName = "Button1"
>
> Now in the click event handler we expose to end users of our control, or
> even in the container of our template, which will fire everytime a click
> event occurs in our template, is to check in this manner :
>
> Sub MyCustomControl_Click(sender As Object, e As

MyControl.CommandEventArgs)
> if e.CommandName = "Button1" then
> 'Take action because button1 was clicked.
> End sub
> End Sub 'MyCustomControl_Click
>
>
> This is possible because the CommandEventArgs object contains data about

the
> Command event that can be accessed in the event handler. The dataGrid
> control does not expose the CommandEventArgs object making it impossible

to
> pass any data and hence we got no identifier, when for example, an
> onItemDataBound event is fired. If you had one dataGrid control no

problem.
> If you had multiple datagrids in your template then you wont know how to
> differentiate btw dataGrids. Also note that this is only my own personal
> reasoning and I am speaking theorically.
>
> It makes sense to me to tell consumers of your control that if they wanted
> to nest datagrids, to do this wrapping them within usercontrols whereas to
> nesting the grid directly and not try and bubble up events for templated
> controls like the dataGrid. This will also give them greater control on

what
> is going on without limiting them.
>
>
>
>
> "apple" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Alessandro, thanks
> > only one way we have as a result for my simple tab control - bubbling?
> > it is of course not convenient, because I don't know what controls may
> > contain tab container...
> >
> >
> >
> >
> >
> >
> > "Alessandro Zifiglio" <(E-Mail Removed)> wrote in
> > message news:7msVb.4918$(E-Mail Removed)...
> > > Apple, in my last post i said that you could bubble up the events for

> the
> > > datagrid control but now that I think of it, bubbling up the dataGrid
> > > controls events is not the real problem but trying to distinguish

which
> > > dataGrid control fired the event as there is no way you can pass an
> > > identifier like we could have done through the CommandArgument or
> > > CommandName properties exposed by contros that postback like the

button
> > > Control etc.
> > >
> > > So what you need to do is have the consumers of your custom control

wrap
> > > their datagrid control and the like within a usercontrol and add the
> > > usercontrol and not the dataGrid directly, like I had mentioned in my
> > > previous post.
> > >
> > >
> > > "Alessandro Zifiglio" <(E-Mail Removed)> wrote

in
> > > message news:0ioVb.4811$(E-Mail Removed)...
> > > > Apple, actually the events fire in your Template helixTab, however

the
> > > idea
> > > > is to trap this event and send it up. I Understand your concern

about
> > the
> > > > dataGrid control, which is a Templated Control in itself, but you

> could
> > > > actually trap these events and send them up, even if in my personal
> > > opinion
> > > > I find this not to be very smart. Reason being that you could have

any
> > > > controls in your template not just a datagrid and it makes it very

> hard
> > to
> > > > keep trapping and exposing these events in your container, and in

the
> > end
> > > > you will end up with a cluttered control that exposes events of

> controls
> > > > that are not directly part of the control but are nested controls.

> This
> > is
> > > > ok for normal click events etc but for controls like the the

datagrid
> > you
> > > > got --onitemcreated --onitemdatabound and many others, for whom you

> > would
> > > > have to trap the event individually and then expose it to the

> consumers
> > of
> > > > your custom control. For templated controls the idea is to provide

one
> > > > handler for specific events, and because most controls have a click

> > event,
> > > i
> > > > think you should bubble this up and expose one handler for all click
> > > events
> > > > and then let the end user distinguish every click by checking the
> > > > ArgumentName attribute for the buttons they defined etc.
> > > >
> > > > As for controls like the dataGrid an easier way to workaround would

be
> > to
> > > > add your datagrid to a UserControl and then add the UserControl as a
> > > > childControl in your Template. This is because a usercontrol has its

> own
> > > > code-behind class where you can code, and use your dataGrids event
> > > handlers
> > > > like you would on any page. If you went this route then you wont

need
> to
> > > > bother with the hassles of bubbling events for Templated Controls

like
> > the
> > > > DataGrid --DataList --Repeater etc which in turn bubble events for

> their
> > > > ChildControls
> > > >
> > > >
> > > > "apple" <(E-Mail Removed)> wrote in message
> > > > news:(E-Mail Removed)...
> > > > > Thank Alessandro for your reply, I think already about bubbling,

and
> I
> > > > have
> > > > > a lot of "theoretical" questions for you or somebody else.
> > > > > If I understand correctly, in my controls hierarchy all controls

> > inside
> > > > > separate tabs fire events, these events yet not propagate up

through
> > the
> > > > > control hierarchy and the page that finally holds my tab control

> don't
> > > > know
> > > > > about these internal events. So if I place nested datagrid

handler's
> > > > inside
> > > > > page class, any level of nested control hierarchy may probably

block
> > > event
> > > > > bubbling, because by default, an event that initiates bubbling is
> > > > > automatically bubbled up through the control hierarchy, as "we can

> see
> > > > from
> > > > > the definition of the RaiseBubbleEvent method and the default
> > > > implementation
> > > > > of OnBubbleEvent" in Control class. I read this in a book

Developing
> > > > > Microsoft ASP.NET Server Controls and Components. Very likely this
> > > > > "blocking" level is a collection of tabs which inherits

> CollectionBase
> > > an
> > > > > don't have default bubbling features. Can you comment these

> thoughts?
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > "Alessandro Zifiglio" <(E-Mail Removed)>

wrote
> > in
> > > > > message news:kEaVb.4637$(E-Mail Removed)...
> > > > > > you must override the onbubbleEvent method in your helixtab

> template
> > > and
> > > > > > send it up to the container.
> > > > > >
> > > > > > Event bubbling is what you want. Look in the docs for more. This

> is
> > an
> > > > old
> > > > > > post where a bit was discussed. Also do not forget to implement
> > > > > > INamingContainer in helixTab.
> > > > > >
> > > > > > Follow up on this post :
> > > > > >
> > > > > >
> > > > >
> > > >
> > >

> >

>

http://groups.google.com/groups?hl=e...3Fq%3DProblem%
2Boverriding%2Brender%2Bmethod%2Bto%2Bformat%2Blit eral%2Bcontent%2Bof%2Bnest
ed%26ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den%26btnG%3DGoogle%2BSearch
> > > > > >
> > > > > > Message 13 onwards we got into event bubbling. Let me know if

your
> > > > stuck.
> > > > > > "apple" <(E-Mail Removed)> wrote in message
> > > > > > news:(E-Mail Removed)...
> > > > > > > sorry, I send copy to webcontrols, and then I find a more

> relevant
> > > > > group,
> > > > > > > please help me
> > > > > > >
> > > > > > > I create a simple custom tabular control, and try for place

set
> of
> > > > > > controls
> > > > > > > inside its tab tags.
> > > > > > > <helix:tabcontrol id="Tab1" runat="server" width="100%">
> > > > > > > <helix:tab header="Users">other controls</helix:tab>
> > > > > > > <helix:tab header="Roles">other controls</helix:tab>
> > > > > > > <helix:tab header="Resources">other controls</helix:tab>
> > > > > > > </helix:tabcontrol>
> > > > > > > Control tree with all nested controls will be created fine,

but
> > > > postback
> > > > > > > events don't firing if I place other controls inside helix:tab

> > tags,
> > > > for
> > > > > > > example the datagrid paging don't work. And databinding work
> > > correct.
> > > > > Why?
> > > > > > > How I can process the postback from nested controls.
> > > > > > >
> > > > > > > thank
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
apple
Guest
Posts: n/a
 
      02-09-2004
Alessandro, thanks for your considerations
I don't fully grasped everything you write in all your replies. I need more
time to think it over and just to do more homework. I'm not ready at present
for a subsequent talk.
Here is the hyperlink to the similar tab control
http://www.devasp.net/net/Net/search/res/r11927.html
My variant also have logic like this (with collection), the difference in
rendering only. I save all your comprehensive post's for further
experimental investigation ) . I will not take up any more of your time,
thank you muchly.



"Alessandro Zifiglio" <(E-Mail Removed)> wrote in
message news:ViMVb.5173$(E-Mail Removed)...
> oops, typo error : its "End If" and not "End sub" ;P
>
> Sub MyCustomControl_Click(sender As Object, e As

MyControl.CommandEventArgs)
> if e.CommandName = "Button1" then
> 'Take action because button1 was clicked.
> End If
> End Sub 'MyCustomControl_Click
> "Alessandro Zifiglio" <(E-Mail Removed)> wrote in
> message news:ReMVb.5172$(E-Mail Removed)...
> > Bubbling is great and you dont need to know what control is contained

> ahead
> > of time, but what events you want to trap and bubble up. Once bubbled,

you
> > want to expose a handler for that specific event. What you dont know is
> > which control fired the event, because you can have 10 buttons in your
> > template and every one of them can fire a click event. Question : So,

how
> do
> > we know who fired this event if we have one generic click event handler
> > exposed by our control ?
> > Answer : For every button we use the CommandName property and set an
> > identifier here : like button1.CommandName = "Button1"
> >
> > Now in the click event handler we expose to end users of our control, or
> > even in the container of our template, which will fire everytime a click
> > event occurs in our template, is to check in this manner :
> >
> > Sub MyCustomControl_Click(sender As Object, e As

> MyControl.CommandEventArgs)
> > if e.CommandName = "Button1" then
> > 'Take action because button1 was clicked.
> > End sub
> > End Sub 'MyCustomControl_Click
> >
> >
> > This is possible because the CommandEventArgs object contains data about

> the
> > Command event that can be accessed in the event handler. The dataGrid
> > control does not expose the CommandEventArgs object making it impossible

> to
> > pass any data and hence we got no identifier, when for example, an
> > onItemDataBound event is fired. If you had one dataGrid control no

> problem.
> > If you had multiple datagrids in your template then you wont know how to
> > differentiate btw dataGrids. Also note that this is only my own personal
> > reasoning and I am speaking theorically.
> >
> > It makes sense to me to tell consumers of your control that if they

wanted
> > to nest datagrids, to do this wrapping them within usercontrols whereas

to
> > nesting the grid directly and not try and bubble up events for templated
> > controls like the dataGrid. This will also give them greater control on

> what
> > is going on without limiting them.
> >
> >
> >
> >
> > "apple" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Alessandro, thanks
> > > only one way we have as a result for my simple tab control - bubbling?
> > > it is of course not convenient, because I don't know what controls may
> > > contain tab container...
> > >
> > >
> > >
> > >
> > >
> > >
> > > "Alessandro Zifiglio" <(E-Mail Removed)> wrote

in
> > > message news:7msVb.4918$(E-Mail Removed)...
> > > > Apple, in my last post i said that you could bubble up the events

for
> > the
> > > > datagrid control but now that I think of it, bubbling up the

dataGrid
> > > > controls events is not the real problem but trying to distinguish

> which
> > > > dataGrid control fired the event as there is no way you can pass an
> > > > identifier like we could have done through the CommandArgument or
> > > > CommandName properties exposed by contros that postback like the

> button
> > > > Control etc.
> > > >
> > > > So what you need to do is have the consumers of your custom control

> wrap
> > > > their datagrid control and the like within a usercontrol and add the
> > > > usercontrol and not the dataGrid directly, like I had mentioned in

my
> > > > previous post.
> > > >
> > > >
> > > > "Alessandro Zifiglio" <(E-Mail Removed)> wrote

> in
> > > > message news:0ioVb.4811$(E-Mail Removed)...
> > > > > Apple, actually the events fire in your Template helixTab, however

> the
> > > > idea
> > > > > is to trap this event and send it up. I Understand your concern

> about
> > > the
> > > > > dataGrid control, which is a Templated Control in itself, but you

> > could
> > > > > actually trap these events and send them up, even if in my

personal
> > > > opinion
> > > > > I find this not to be very smart. Reason being that you could have

> any
> > > > > controls in your template not just a datagrid and it makes it very

> > hard
> > > to
> > > > > keep trapping and exposing these events in your container, and in

> the
> > > end
> > > > > you will end up with a cluttered control that exposes events of

> > controls
> > > > > that are not directly part of the control but are nested controls.

> > This
> > > is
> > > > > ok for normal click events etc but for controls like the the

> datagrid
> > > you
> > > > > got --onitemcreated --onitemdatabound and many others, for whom

you
> > > would
> > > > > have to trap the event individually and then expose it to the

> > consumers
> > > of
> > > > > your custom control. For templated controls the idea is to provide

> one
> > > > > handler for specific events, and because most controls have a

click
> > > event,
> > > > i
> > > > > think you should bubble this up and expose one handler for all

click
> > > > events
> > > > > and then let the end user distinguish every click by checking the
> > > > > ArgumentName attribute for the buttons they defined etc.
> > > > >
> > > > > As for controls like the dataGrid an easier way to workaround

would
> be
> > > to
> > > > > add your datagrid to a UserControl and then add the UserControl as

a
> > > > > childControl in your Template. This is because a usercontrol has

its
> > own
> > > > > code-behind class where you can code, and use your dataGrids event
> > > > handlers
> > > > > like you would on any page. If you went this route then you wont

> need
> > to
> > > > > bother with the hassles of bubbling events for Templated Controls

> like
> > > the
> > > > > DataGrid --DataList --Repeater etc which in turn bubble events for

> > their
> > > > > ChildControls
> > > > >
> > > > >
> > > > > "apple" <(E-Mail Removed)> wrote in message
> > > > > news:(E-Mail Removed)...
> > > > > > Thank Alessandro for your reply, I think already about bubbling,

> and
> > I
> > > > > have
> > > > > > a lot of "theoretical" questions for you or somebody else.
> > > > > > If I understand correctly, in my controls hierarchy all controls
> > > inside
> > > > > > separate tabs fire events, these events yet not propagate up

> through
> > > the
> > > > > > control hierarchy and the page that finally holds my tab control

> > don't
> > > > > know
> > > > > > about these internal events. So if I place nested datagrid

> handler's
> > > > > inside
> > > > > > page class, any level of nested control hierarchy may probably

> block
> > > > event
> > > > > > bubbling, because by default, an event that initiates bubbling

is
> > > > > > automatically bubbled up through the control hierarchy, as "we

can
> > see
> > > > > from
> > > > > > the definition of the RaiseBubbleEvent method and the default
> > > > > implementation
> > > > > > of OnBubbleEvent" in Control class. I read this in a book

> Developing
> > > > > > Microsoft ASP.NET Server Controls and Components. Very likely

this
> > > > > > "blocking" level is a collection of tabs which inherits

> > CollectionBase
> > > > an
> > > > > > don't have default bubbling features. Can you comment these

> > thoughts?
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > "Alessandro Zifiglio" <(E-Mail Removed)>

> wrote
> > > in
> > > > > > message news:kEaVb.4637$(E-Mail Removed)...
> > > > > > > you must override the onbubbleEvent method in your helixtab

> > template
> > > > and
> > > > > > > send it up to the container.
> > > > > > >
> > > > > > > Event bubbling is what you want. Look in the docs for more.

This
> > is
> > > an
> > > > > old
> > > > > > > post where a bit was discussed. Also do not forget to

implement
> > > > > > > INamingContainer in helixTab.
> > > > > > >
> > > > > > > Follow up on this post :
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >

> >

>

http://groups.google.com/groups?hl=e...3Fq%3DProblem%
>

2Boverriding%2Brender%2Bmethod%2Bto%2Bformat%2Blit eral%2Bcontent%2Bof%2Bnest
> ed%26ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den%26btnG%3DGoogle%2BSearch
> > > > > > >
> > > > > > > Message 13 onwards we got into event bubbling. Let me know if

> your
> > > > > stuck.
> > > > > > > "apple" <(E-Mail Removed)> wrote in message
> > > > > > > news:(E-Mail Removed)...
> > > > > > > > sorry, I send copy to webcontrols, and then I find a more

> > relevant
> > > > > > group,
> > > > > > > > please help me
> > > > > > > >
> > > > > > > > I create a simple custom tabular control, and try for place

> set
> > of
> > > > > > > controls
> > > > > > > > inside its tab tags.
> > > > > > > > <helix:tabcontrol id="Tab1" runat="server" width="100%">
> > > > > > > > <helix:tab header="Users">other controls</helix:tab>
> > > > > > > > <helix:tab header="Roles">other controls</helix:tab>
> > > > > > > > <helix:tab header="Resources">other controls</helix:tab>
> > > > > > > > </helix:tabcontrol>
> > > > > > > > Control tree with all nested controls will be created fine,

> but
> > > > > postback
> > > > > > > > events don't firing if I place other controls inside

helix:tab
> > > tags,
> > > > > for
> > > > > > > > example the datagrid paging don't work. And databinding work
> > > > correct.
> > > > > > Why?
> > > > > > > > How I can process the postback from nested controls.
> > > > > > > >
> > > > > > > > thank
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
apple
Guest
Posts: n/a
 
      02-09-2004
I found a good new article by Scott Mitchell: Building Templated ASP.NET
Server Controls
http://msdn.microsoft.com/asp.net/de...SrvrCntrls.asp



"Alessandro Zifiglio" <(E-Mail Removed)> wrote in
message news:ViMVb.5173$(E-Mail Removed)...
> oops, typo error : its "End If" and not "End sub" ;P
>
> Sub MyCustomControl_Click(sender As Object, e As

MyControl.CommandEventArgs)
> if e.CommandName = "Button1" then
> 'Take action because button1 was clicked.
> End If
> End Sub 'MyCustomControl_Click
> "Alessandro Zifiglio" <(E-Mail Removed)> wrote in
> message news:ReMVb.5172$(E-Mail Removed)...
> > Bubbling is great and you dont need to know what control is contained

> ahead
> > of time, but what events you want to trap and bubble up. Once bubbled,

you
> > want to expose a handler for that specific event. What you dont know is
> > which control fired the event, because you can have 10 buttons in your
> > template and every one of them can fire a click event. Question : So,

how
> do
> > we know who fired this event if we have one generic click event handler
> > exposed by our control ?
> > Answer : For every button we use the CommandName property and set an
> > identifier here : like button1.CommandName = "Button1"
> >
> > Now in the click event handler we expose to end users of our control, or
> > even in the container of our template, which will fire everytime a click
> > event occurs in our template, is to check in this manner :
> >
> > Sub MyCustomControl_Click(sender As Object, e As

> MyControl.CommandEventArgs)
> > if e.CommandName = "Button1" then
> > 'Take action because button1 was clicked.
> > End sub
> > End Sub 'MyCustomControl_Click
> >
> >
> > This is possible because the CommandEventArgs object contains data about

> the
> > Command event that can be accessed in the event handler. The dataGrid
> > control does not expose the CommandEventArgs object making it impossible

> to
> > pass any data and hence we got no identifier, when for example, an
> > onItemDataBound event is fired. If you had one dataGrid control no

> problem.
> > If you had multiple datagrids in your template then you wont know how to
> > differentiate btw dataGrids. Also note that this is only my own personal
> > reasoning and I am speaking theorically.
> >
> > It makes sense to me to tell consumers of your control that if they

wanted
> > to nest datagrids, to do this wrapping them within usercontrols whereas

to
> > nesting the grid directly and not try and bubble up events for templated
> > controls like the dataGrid. This will also give them greater control on

> what
> > is going on without limiting them.
> >
> >
> >
> >
> > "apple" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Alessandro, thanks
> > > only one way we have as a result for my simple tab control - bubbling?
> > > it is of course not convenient, because I don't know what controls may
> > > contain tab container...
> > >
> > >
> > >
> > >
> > >
> > >
> > > "Alessandro Zifiglio" <(E-Mail Removed)> wrote

in
> > > message news:7msVb.4918$(E-Mail Removed)...
> > > > Apple, in my last post i said that you could bubble up the events

for
> > the
> > > > datagrid control but now that I think of it, bubbling up the

dataGrid
> > > > controls events is not the real problem but trying to distinguish

> which
> > > > dataGrid control fired the event as there is no way you can pass an
> > > > identifier like we could have done through the CommandArgument or
> > > > CommandName properties exposed by contros that postback like the

> button
> > > > Control etc.
> > > >
> > > > So what you need to do is have the consumers of your custom control

> wrap
> > > > their datagrid control and the like within a usercontrol and add the
> > > > usercontrol and not the dataGrid directly, like I had mentioned in

my
> > > > previous post.
> > > >
> > > >
> > > > "Alessandro Zifiglio" <(E-Mail Removed)> wrote

> in
> > > > message news:0ioVb.4811$(E-Mail Removed)...
> > > > > Apple, actually the events fire in your Template helixTab, however

> the
> > > > idea
> > > > > is to trap this event and send it up. I Understand your concern

> about
> > > the
> > > > > dataGrid control, which is a Templated Control in itself, but you

> > could
> > > > > actually trap these events and send them up, even if in my

personal
> > > > opinion
> > > > > I find this not to be very smart. Reason being that you could have

> any
> > > > > controls in your template not just a datagrid and it makes it very

> > hard
> > > to
> > > > > keep trapping and exposing these events in your container, and in

> the
> > > end
> > > > > you will end up with a cluttered control that exposes events of

> > controls
> > > > > that are not directly part of the control but are nested controls.

> > This
> > > is
> > > > > ok for normal click events etc but for controls like the the

> datagrid
> > > you
> > > > > got --onitemcreated --onitemdatabound and many others, for whom

you
> > > would
> > > > > have to trap the event individually and then expose it to the

> > consumers
> > > of
> > > > > your custom control. For templated controls the idea is to provide

> one
> > > > > handler for specific events, and because most controls have a

click
> > > event,
> > > > i
> > > > > think you should bubble this up and expose one handler for all

click
> > > > events
> > > > > and then let the end user distinguish every click by checking the
> > > > > ArgumentName attribute for the buttons they defined etc.
> > > > >
> > > > > As for controls like the dataGrid an easier way to workaround

would
> be
> > > to
> > > > > add your datagrid to a UserControl and then add the UserControl as

a
> > > > > childControl in your Template. This is because a usercontrol has

its
> > own
> > > > > code-behind class where you can code, and use your dataGrids event
> > > > handlers
> > > > > like you would on any page. If you went this route then you wont

> need
> > to
> > > > > bother with the hassles of bubbling events for Templated Controls

> like
> > > the
> > > > > DataGrid --DataList --Repeater etc which in turn bubble events for

> > their
> > > > > ChildControls
> > > > >
> > > > >
> > > > > "apple" <(E-Mail Removed)> wrote in message
> > > > > news:(E-Mail Removed)...
> > > > > > Thank Alessandro for your reply, I think already about bubbling,

> and
> > I
> > > > > have
> > > > > > a lot of "theoretical" questions for you or somebody else.
> > > > > > If I understand correctly, in my controls hierarchy all controls
> > > inside
> > > > > > separate tabs fire events, these events yet not propagate up

> through
> > > the
> > > > > > control hierarchy and the page that finally holds my tab control

> > don't
> > > > > know
> > > > > > about these internal events. So if I place nested datagrid

> handler's
> > > > > inside
> > > > > > page class, any level of nested control hierarchy may probably

> block
> > > > event
> > > > > > bubbling, because by default, an event that initiates bubbling

is
> > > > > > automatically bubbled up through the control hierarchy, as "we

can
> > see
> > > > > from
> > > > > > the definition of the RaiseBubbleEvent method and the default
> > > > > implementation
> > > > > > of OnBubbleEvent" in Control class. I read this in a book

> Developing
> > > > > > Microsoft ASP.NET Server Controls and Components. Very likely

this
> > > > > > "blocking" level is a collection of tabs which inherits

> > CollectionBase
> > > > an
> > > > > > don't have default bubbling features. Can you comment these

> > thoughts?
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > "Alessandro Zifiglio" <(E-Mail Removed)>

> wrote
> > > in
> > > > > > message news:kEaVb.4637$(E-Mail Removed)...
> > > > > > > you must override the onbubbleEvent method in your helixtab

> > template
> > > > and
> > > > > > > send it up to the container.
> > > > > > >
> > > > > > > Event bubbling is what you want. Look in the docs for more.

This
> > is
> > > an
> > > > > old
> > > > > > > post where a bit was discussed. Also do not forget to

implement
> > > > > > > INamingContainer in helixTab.
> > > > > > >
> > > > > > > Follow up on this post :
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >

> >

>

http://groups.google.com/groups?hl=e...3Fq%3DProblem%
>

2Boverriding%2Brender%2Bmethod%2Bto%2Bformat%2Blit eral%2Bcontent%2Bof%2Bnest
> ed%26ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den%26btnG%3DGoogle%2BSearch
> > > > > > >
> > > > > > > Message 13 onwards we got into event bubbling. Let me know if

> your
> > > > > stuck.
> > > > > > > "apple" <(E-Mail Removed)> wrote in message
> > > > > > > news:(E-Mail Removed)...
> > > > > > > > sorry, I send copy to webcontrols, and then I find a more

> > relevant
> > > > > > group,
> > > > > > > > please help me
> > > > > > > >
> > > > > > > > I create a simple custom tabular control, and try for place

> set
> > of
> > > > > > > controls
> > > > > > > > inside its tab tags.
> > > > > > > > <helix:tabcontrol id="Tab1" runat="server" width="100%">
> > > > > > > > <helix:tab header="Users">other controls</helix:tab>
> > > > > > > > <helix:tab header="Roles">other controls</helix:tab>
> > > > > > > > <helix:tab header="Resources">other controls</helix:tab>
> > > > > > > > </helix:tabcontrol>
> > > > > > > > Control tree with all nested controls will be created fine,

> but
> > > > > postback
> > > > > > > > events don't firing if I place other controls inside

helix:tab
> > > tags,
> > > > > for
> > > > > > > > example the datagrid paging don't work. And databinding work
> > > > correct.
> > > > > > Why?
> > > > > > > > How I can process the postback from nested controls.
> > > > > > > >
> > > > > > > > thank
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
databound custom controls vs composite databound custom controls rodchar ASP .Net 0 11-26-2007 03:51 PM
events in composite custom controls in asp.net 2.0 C# Ralph ASP .Net 0 12-15-2006 04:34 PM
Composite control with dynamic composite controls sleigh ASP .Net 1 02-12-2004 06:24 PM
Composite custom controls events apple ASP .Net Web Controls 1 02-07-2004 08:00 PM
Child controls in Composite Controls not firing events David Boike ASP .Net Web Controls 0 08-07-2003 05:39 PM



Advertisments