SqlDataSource Selecting/Selected events not firing

Hi,

I have a SqlDataSource and am trying to establish if it returns rows using the selected event e.AffectedRows statement. Unfortunately the selected event does not fire.

 

I am using a stored procedure with 2 parameters:

applicantID - Int32 - Parameter source from control label text

issueStatus - Int16 - Parameter source 'None' default value = 1

 

When i test it during configuration it returns 1 row as expected. 

I am manually running the DataSource using ds.DataBind(); after a button click.

 

Anyone know why its not firing the event?

Thanks
 

0
Assimalyst
11/21/2006 10:19:35 AM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

1 Replies
1332 Views

Similar Articles

[PageSpeed] 43

Solved it. The problem was with DataSource.DataBind().

I needed to 'Select' on the DataSource:

 

DataSource.Select(DataSourceSelectArguments.Empty); 

 

Hope this helps someone. 

0
Assimalyst
11/22/2006 11:05:45 AM
Reply:

Similar Artilces:

SqlDataSource events selecting and selected not work
When I handle a event for selecting to change the value of a parameter it does not use the new value and the selected event is never called. What am I doing wrong?   protected void OptionListSource_Selecting(object sender, SqlDataSourceSelectingEventArgs e) { string productID = Request.QueryString["p"].ToString(); SqlDataSourceView Source = (SqlDataSourceView)sender; Source.SelectParameters["ProductID"].DefaultValue=productID; } protected void OptionListSource_Selected(object sender, SqlDataSourceStatusEventArgs e) { SqlDataSourceView Source = (SqlDataSourceView)sender; } ...

Sqldatasource Selected event not firing?
Using Sql server 2005, SQLdatasource, I need to display total rows count.  But the selected event is not fired?  Am I mssing something or doing something wrong? Please comment.  thanks Code<asp:SqlDataSource ID="DataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:AuditToolConnection%>" ProviderName="System.Data.SqlClient"SelectCommandType="StoredProcedure" SelectCommand="usp_Dashboard_GetAll" >  -------------------------------- public in recordCount = 0;protected void DataSourc...

DataSource Selected Event not firing
Greetings, In Asp. 2.0 I have a page with several datasource controls and FormViews. Inside of the DS load event I am assigning the SQL: Protected Sub ds_TransactionInfo_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles ds_TransactionInfo.Load ds_TransactionInfo.SelectParameters.Clear() ds_TransactionInfo.SelectParameters.Add("Sub_Cat_Id", selectedRowID) ds_TransactionInfo.SelectCommand = _"SELECT Disp_Req_Id as RequestNbr, Sales_Authority_Nbr as SalesAuthNbr, Invoiced, Like_Kind_Exchange as LKE, Sale_Type FROM " _ & sqlTable & &...

SELECT from SELECT
Hi! I remember seeing an example where you can do a select from a nested select, but I cannot seem to make it work. So it would be something like this: select max( name ) from ( select name from customer union select name from vendor ) Was I dreaming I saw that? Thanks! D In article <4500243f@forums-2-dub>, daniel_AT_infrontsoftware_DOT_com@N0SPAM.com says... > Hi! > > I remember seeing an example where you can do a select from a nested > select, but I cannot seem to make it work. No, you weren't. Try (UNTESTED!) adding a...

Should SqlDataSource Selected Event always fire?
Hi  In the page load of my webpage I call a databind for a gridview. It generally calls this event handler : protected void SqlDataSource1_Selected(object sender, SqlDataSourceStatusEventArgs e)   However sometimes (seemingly randomly) it doesn't. Any ideas? Thanks p    protected void Page_Load(object sender, EventArgs e) { ... if (searchText != "")     SqlDataSource1.SelectParameters["search"].DefaultValue = searchText; else{ SqlDataSource1.SelectParameters["search"].DefaultValue = ""; GridView1.DataBind(); } Hi, The event occurs when ...

superreview requested: [Bug 166004] Leave submenu, no accessible focus event fired for selected item in parent menu : [Attachment 157055] Make sure DOMMenuItemActive gets fired for currently selected
Aaron Leventhal <aaronleventhal@moonset.net> has asked Brian Ryner (IBM) <bryner@brianryner.com> for superreview: Bug 166004: Leave submenu, no accessible focus event fired for selected item in parent menu http://bugzilla.mozilla.org/show_bug.cgi?id=166004 Attachment 157055: Make sure DOMMenuItemActive gets fired for currently selected menu item after child menu closed http://bugzilla.mozilla.org/attachment.cgi?id=157055&action=edit ...

superreview granted: [Bug 166004] Leave submenu, no accessible focus event fired for selected item in parent menu : [Attachment 157055] Make sure DOMMenuItemActive gets fired for currently selected m
Brian Ryner (IBM) <bryner@brianryner.com> has granted Aaron Leventhal <aaronleventhal@moonset.net>'s request for superreview: Bug 166004: Leave submenu, no accessible focus event fired for selected item in parent menu https://bugzilla.mozilla.org/show_bug.cgi?id=166004 Attachment 157055: Make sure DOMMenuItemActive gets fired for currently selected menu item after child menu closed https://bugzilla.mozilla.org/attachment.cgi?id=157055&action=edit ...

selecting
I have an aspx page with an object data source control and a gridview control.  The purpose of the page is to display search results - so only the select method parameters have been populated.  The gridview is wrapped in an update panel and a script manager exists on the page as to make the paging clicks less noticeable. The problem (its sort of invisible to the user) is that the Selecting/Selected events fire before and after the page load event.  This happens always - when the page loads - when parameters are passed through the querystring etc.  Now I am awar...

Selecting event fires before control event
 Hi, My problem is as follows. I have a page with:- a dropdownlist- an object datasource - an updatepanel containing a Janus GridEx controlThe grid is bound to the datasource. The updatepanel has one trigger: the dropdownlist selectedIndexChanged event. I want to use the dropdownlist to filter items. In the Datasource Selecting event I do this:e.InputParameters["status"] = ddlFilterStatus.SelectedValue;Now the problem is that SelectedValue still contains the previous value, i think because the datasource loads it's data before the control is updated. A dirty workaroun...

Why is the select saying selected after an item is selected?
This was a whitelisting issue due to a software upgrade at hostgator..  Nothing wrong with my code..Scot King SEO Software Tool | Search Engine Optimization"Get your page rank high"  huh? It is smart to put your question in the body and not just in the title. Have no idea what your question is or if it even a question.Eric Pascarello.com | Twitter epascarello | LinkedIn use thisddl.options[ddl.selectedIndex].selected = false; //Clear the selection ddl.options[1].selected = trueMAKMark as Answer if this reply helps youMVP ASP/ASP.NetASP.Net Hosting : Host DepotMy Sit...

superreview requested: [Bug 267627] select event isn't fired when selection of listbox is changed : [Attachment 166293] patch
Chris Thomas (CTho) <cst@andrew.cmu.edu> has asked Robert O'Callahan <roc@ocallahan.org> for superreview: Bug 267627: select event isn't fired when selection of listbox is changed https://bugzilla.mozilla.org/show_bug.cgi?id=267627 Attachment 166293: patch https://bugzilla.mozilla.org/attachment.cgi?id=166293&action=edit ...

need a link that will fire an event when selected (code behind in VB.NET)
I'm developing an ASP.NET application with VB on the Code Behind. I'm looking for a link type button that will fire an event when selected, but behave as a typicall link by opening a new instance if IE after the event 'OnClick' has fired. My target IE page to be open will be a mail form that will behave differently depending on what page the request originated from. I would like to perform this in the VB backend since I don't know anything about ASP. Anyone know of a control that will fire the event, then open the new page? Maybe what I need is to use a link button and open the new ...

superreview granted: [Bug 267627] select event isn't fired when selection of listbox is changed : [Attachment 166293] patch
Brian Ryner (IBM) <bryner@brianryner.com> has granted Robert O'Callahan <roc@ocallahan.org>'s request for superreview: Bug 267627: select event isn't fired when selection of listbox is changed https://bugzilla.mozilla.org/show_bug.cgi?id=267627 Attachment 166293: patch https://bugzilla.mozilla.org/attachment.cgi?id=166293&action=edit ...

superreview requested: [Bug 267627] select event isn't fired when selection of listbox is changed : [Attachment 166293] patch #2
Robert O'Callahan <roc@ocallahan.org> has asked Brian Ryner (IBM) <bryner@brianryner.com> for superreview: Bug 267627: select event isn't fired when selection of listbox is changed https://bugzilla.mozilla.org/show_bug.cgi?id=267627 Attachment 166293: patch https://bugzilla.mozilla.org/attachment.cgi?id=166293&action=edit ------- Additional Comments from Robert O'Callahan <roc@ocallahan.org> Brian might have more of a clue about this than either dbaron or I. ...

Web resources about - SqlDataSource Selecting/Selected events not firing - asp.net.sql-datasource

Latest Updates
Latest Updates - Free source code and tutorials for Software developers and Architects.; Updated: 15 Feb 2013

Using The LINQDataSource
-*+There is a new datasource control available in Visual Studio that works in much the same way as the SQLDataSource and the ObjectDataSource. ...

moredotnet
M ore d otnet .NET Interview Questions, ASP.NET, C#, VB.NET, XML, SQL Check Out http://www.dotnetUncle.com √ .NET NOTES OOPS in .NET .NET ...

Architectural Overview of the Windows Presentation Foundation Beta 1 Release
Introduction Windows Presentation Foundation Beta 1 Windows Integration New Features WinFX SDK Exploring the New Features Introducing "Express" ...

About Mikesdotnetting
I started this site as somewhere to store answers to bits and pieces that I see asked frequently in the forums at www.asp.net . Rather than type ...

Using MiniProfiler with SqlDataSource ASP.NET WebForms Control
public class ProfiledSqlDataSource : SqlDataSource{ protected override DbProviderFactory GetDbProviderFactory() { // get the "base" DbProviderFactory ...

ASP.NET Pivot Table - RadPivotGrid for ASP.NET AJAX
... reports. RadPivotGrid allows easy customization of all data reports. Try now! Use any declarative data source control (AccessDataSource, SqlDataSource, ...

Sign on
Sign On • Join • Forums Home User Name * Password * Remember me next time ( I forgot my password ) SUBMIT YOUR WTF Content Random Article All ...

ComboBox Sample
ComboBox is an ASP.NET AJAX control that, like the AutoCompleteExtender , combines the flexibility of a TextBox with a list of options that users ...

Latest Updates
Latest Updates - Free source code and tutorials for Software developers and Architects.; Updated: 15 Feb 2013

Resources last updated: 12/7/2015 3:01:51 AM