Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / November 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
msch-prv@bluewin.ch - 31 Oct 2007 20:58 GMT
I would like to raise the selected event of an objectdatasource (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(ByVal sender As Object, _
  ByVal e As
System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)

Protected Sub btn1_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
 Dim sender1 As Object
 Dim e1 As System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs
 RaiseEvent MyodsSelected(sender1,e1)
End Sub

Protected Sub odsRecipeDet_Selected(ByVal sender As Object,
  ByVal e As
System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)
  ...
End Sub
Manu - 05 Nov 2007 12:19 GMT
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.DataSourceID = "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 ExtendedObjectDataSource, a replacement for the
ObjectDataSource with more features. Visit http://www.manuelabadia.com
for more information.

> I would like to raise the selected event of anobjectdatasource(ods)
> to retrieve some data. I tried to raise this event using a server
[quoted text clipped - 22 lines]
>    ...
> End Sub

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.