Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Event syntax problem to call up the selected event of an ods

Reply
Thread Tools

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

 
 
msch-prv@bluewin.ch
Guest
Posts: n/a
 
      10-31-2007
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.ObjectDataSourceStatusEv entArgs)

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

Protected Sub odsRecipeDet_Selected(ByVal sender As Object,
ByVal e As
System.Web.UI.WebControls.ObjectDataSourceStatusEv entArgs)
...
End Sub

 
Reply With Quote
 
 
 
 
Manu
Guest
Posts: n/a
 
      11-05-2007
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.


On 31 oct, 20:58, (E-Mail Removed) wrote:
> I would like to raise the selected event of anobjectdatasource(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.ObjectDataSourceStatusEv entArgs)
>
> Protected Sub btn1_Click(ByVal sender As Object, ByVal e As
> System.EventArgs)
> Dim sender1 As Object
> Dim e1 As System.Web.UI.WebControls.ObjectDataSourceStatusEv entArgs
> RaiseEvent MyodsSelected(sender1,e1)
> End Sub
>
> Protected Sub odsRecipeDet_Selected(ByVal sender As Object,
> ByVal e As
> System.Web.UI.WebControls.ObjectDataSourceStatusEv entArgs)
> ...
> End Sub



 
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
Updating ODS with FormView Larry R ASP .Net 0 05-18-2006 08:41 PM
ODS - Incomplete InputParameters rroger ASP .Net 0 04-27-2006 12:12 PM
GridView & ODS in another assembly Sebis ASP .Net 0 04-14-2006 08:25 AM
GridView ODS and ConvertEmptyStringToNull="false" Andrew Robinson ASP .Net 1 04-14-2006 07:30 AM
ODS + TableAdapter + Rowcount robert madrian ASP .Net 0 12-19-2005 05:45 PM



Advertisments