473,503 Members | 544 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

raise a bubble event.

Hi

I am trying to raise a bubble event.

I have a dropdownlist and a datalist in a datalist.

I want to use the postback from the dropdownlist to rebind the nested
datalist. But i need the event to be a datalist Command so i have
access to e.item for the main datalist

the aspx code

<asp:datalist id=PostageGroups
OnSelectedIndexChanged="ddlGroupStatus_SelectedInd exChanged"
AutoPostBack="True" ' etc...
<ItemTemplate>
'my dropdown for picking the status
'of the items to be listed in
<asp:dropdownlist id=ItemStatus ...
</asp:dropdownlist>
'nested datalist
<asp:datalist id=PostageItems
'some more code...
</asp:datalist:asp>
</ItemTemplate>
</asp:datalist>

i am trying to catch the datalist PostageGroups postback for the
dropdownlist ItemStatus so i can rebind the rested datalist

the aspx.vb code:

Public Event Command As
System.Web.UI.WebControls.CommandEventHandler

Protected Overridable Sub OnCommand(ByVal e As
System.Web.UI.WebControls.CommandEventArgs, ByVal source As Object)

RaiseEvent Command(source, e)

RaiseBubbleEvent(source, e)

End Sub

Public Sub ddlGroupStatus_SelectedIndexChanged(ByVal sender As
Object, ByVal e As System.EventArgs)

OnCommand(New
System.Web.UI.WebControls.CommandEventArgs("DropDo wn", CType(sender,
DropDownList).SelectedValue), CType(sender, DropDownList))

End Sub

Private Sub PostageTypes_ItemCommand(ByVal source As Object,
ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs ) Handles
PostageTypes.ItemCommand

If e.CommandName = "DropDown" Then

Dim GroupID As Integer =
CType(CType(e.Item.FindControl("lblDeliveryGroupID "), Label).Text,
Integer)
Dim Status As Boolean =
CBool(CType(e.Item.FindControl("ddlGroupStatus"),
DropDownList).SelectedValue)
Dim myPostage As New Ecom_PostageDB

With CType(PostageTypes.FindControl("PostageList"),
DataList)
..SelectedIndex = -1
..DataSource =
myPostage.GetPostageItemsByStatusAndGroup(Status, GroupID)
..DataBind()
End With

End If

Nov 21 '05 #1
0 970

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
10493
by: Dan Cimpoiesu | last post by:
I have a remoting object, derived from MarshalByRefComponent, that I instantiate on the client side, with Activator.GetObject. Can I receive events fired on the server, on the client? How?
5
6818
by: Tom Gao | last post by:
Hello friends I'm trying to perform event bubble on a user control from the example on http://odetocode.com/Articles/94.aspx but this example doesn't work... when I run the code it says...
1
4355
by: Lucifer | last post by:
Hi I am trying to raise a bubble event. I have a dropdownlist and a datalist in a datalist. I want to use the postback from the dropdownlist to rebind the nested datalist. But i need the...
12
2922
by: Vittorio Pavesi | last post by:
Hello, is it possible to manually raise the event Elapsed of the timer object ? Vittorio
4
4514
by: Jeremy | last post by:
I have a combobox with a SelectionChangeCommitted event handler, and am having a problem raising this event. For example, raiseEvent mycombobox.SelectionChangeCommitted gives me an error...
2
2065
by: Pietro | last post by:
Hello, somebody know how to raise an event from a nested class? I have two classes, the class1 with 1 events, and a nested class (class2) inside the class1. So... How can I raise class1 events...
1
9930
by: Anonieko | last post by:
I know Visual Studio lacked support on easily writing code to raise events from a ascx user control ( because you have to hand write them)....
3
2115
by: =?Utf-8?B?Ulc=?= | last post by:
I constructed a new Class with some private members. I would like an event to be raised on the moment the value of one of those private members is changed. How do I define an event for that...
5
1996
by: Mike | last post by:
Hi group; Let say I have an object called Account, that raises an event called AccountLow with its owns EventArgs, and when this event gets raised, I will like to raise another custom...
0
1061
by: shapper | last post by:
Hello, I have a few custom controls organized as follows: Parent Child Section User User control raises an event named Updated. This event has custom arguments of type UpdatedEventArgs.
0
7203
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7087
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7334
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6993
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7462
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
737
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.