473,668 Members | 2,383 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Event syntax problem to call up the selected event of an ods

I would like to raise the selected event of an objectdatasourc e (ods)
to retrieve some data. I tried to raise this event using a server
button. I am at a loss as to how set up the RaiseEvent syntax
arguments.

Question: is it possible to call this event from a button server
control? Thanks for any pointers.

I tried variations of the following:

Private Event MyodsSelected(B yVal sender As Object, _
ByVal e As
System.Web.UI.W ebControls.Obje ctDataSourceSta tusEventArgs)

Protected Sub btn1_Click(ByVa l sender As Object, ByVal e As
System.EventArg s)
Dim sender1 As Object
Dim e1 As System.Web.UI.W ebControls.Obje ctDataSourceSta tusEventArgs
RaiseEvent MyodsSelected(s ender1,e1)
End Sub

Protected Sub odsRecipeDet_Se lected(ByVal sender As Object,
ByVal e As
System.Web.UI.W ebControls.Obje ctDataSourceSta tusEventArgs)
...
End Sub

Oct 31 '07 #1
1 1105
The Selected event of an ODS is raised by the control when a Select
operation completes (and the data is not cached). You can't generate
this event manually. If you need to perform a Select operation in an
ODS called myODS that is bound to a GridView called myGridView, you
can do:

myGridView.Data SourceID = "myODS" and that should force a Select
operation again, so you'll have the Selecting event raised, then the
data fetched, and then the Selected event raised (if caching was not
used).

I don't understand why do you want to raise the Selected event. If you
can explain your scenario maybe I can help you more.

Regards,
Manuel Abadia

Author of the ExtendedObjectD ataSource, a replacement for the
ObjectDataSourc e with more features. Visit http://www.manuelabadia.com
for more information.
On 31 oct, 20:58, msch-...@bluewin.ch wrote:
I would like to raise the selected event of anobjectdatasou rce(ods)
to retrieve some data. I tried to raise this event using a server
button. I am at a loss as to how set up the RaiseEvent syntax
arguments.

Question: is it possible to call this event from a button server
control? Thanks for any pointers.

I tried variations of the following:

Private Event MyodsSelected(B yVal sender As Object, _
ByVal e As
System.Web.UI.W ebControls.Obje ctDataSourceSta tusEventArgs)

Protected Sub btn1_Click(ByVa l sender As Object, ByVal e As
System.EventArg s)
Dim sender1 As Object
Dim e1 As System.Web.UI.W ebControls.Obje ctDataSourceSta tusEventArgs
RaiseEvent MyodsSelected(s ender1,e1)
End Sub

Protected Sub odsRecipeDet_Se lected(ByVal sender As Object,
ByVal e As
System.Web.UI.W ebControls.Obje ctDataSourceSta tusEventArgs)
...
End Sub

Nov 5 '07 #2

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

Similar topics

4
8412
by: Perion | last post by:
I have a simple form with, among other things, an ADODC data control (called "Adodc1"). The ADO connection to the database tests fine but when I try to add code to any of the Adodc1 control's event procs and then run the app I get a compiler error: "Procedure declaration does not match description of event or procedure having the same name." On clicking Help for the error it says:
0
7035
by: Andy Read | last post by:
Hello all, I have the requirement to produce source code that produces an object hierarchy. Example: Root | Folder 1
4
4906
by: Pai | last post by:
hello there, I am trying to rersize the window it works find in IE but doea not work with mozilla window.attachEvent(onload,MWSOnLoad); window.onload = function (MWSOnLoad) { alert('hello'); window.resizeTo(810,750); top.outerWidth=810;
0
5738
by: Oz | last post by:
Hi Using VS.NET 2003, Windows XP SP1, We have a page which has been developed using ASP.NET. On it, is a button which when clicked is supposed to add some data to a table. When the button is selected, it causes the ServerClick event to be called twice. Here's the code: You'll see that there are two grids on the page, and that the function SetupDataGrid populates data to the two grid. There are also
10
1879
by: HABJAN ®iga | last post by:
Ok, the trouble: On form: Mask (lots of textboxes & ...) Listview 1 as Listview with some items booEdit as boolean=False intEditIndex as integer Scenario:
5
13945
by: Stuart Shay | last post by:
Hello All I am working on ASP.NET 1.1 Custom Pager that allows a User to Enter a Number in a TextBox and go to the page selected. Since the OnClick Event does not work in ASP.NET 1.1 for a TextBox I want to use a hidden button to fire when the Onclick Event is fired for the TextBox.
3
2451
by: Andreas Wöckl | last post by:
HI Group! I have to programmatically create a user input form with various Checkbox and RadioButton lists - Beside every List I have to place an image button that is able to reset the checkboxlists and radiobutton lists. if i declare a variable with private withEvents img as ImageButton
6
1875
by: tshad | last post by:
I was looking at a page that showed how to set up a custom event and it seems to work ok. But I am not sure how I would use it. How would I subscribe to it. There is actual action (such as pressing a button or changing text in a textbox). It gets set up and on the user control on my web page I can see the event from intellisense. So it seems to be set up, but I am trying to get an easy example of how I would now use this event. ...
0
8459
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8378
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8890
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8791
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8653
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7398
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4202
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2786
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.