objectdatasource

VB.Net: How to use an Object data source in report (.rdlc)

My question is similar to this one but I'm having some problems with the actual implementation. I've got a report (.rdlc) in the business layer of a 3-tier app. I've got an object in the BL (EmployeeManager) which has a GetEmployees(Expression as Expression(Of Func(Of Employee, Boolean))) As IQueryable(Of Employee) method. As I didn'...

Unable to cast object of type 'CompaniesDataTable' to type 'CompaniesDataTable'.

Has anyone come across an error like the following: Unable to cast object of type 'CompaniesDataTable' to type 'CompaniesDataTable'. Here is the code that is causing the error: protected void ObjectDataSource_Companies_Selected(object sender, ObjectDataSourceStatusEventArgs e) { int x = ((Adala.CompaniesDataTable)(e....

ObjectDataSource Delete problems

Hi all! Enviroment: asp.net framework 2.0 I'm having problems with the Delete method of and ObjectDataSource on a custom object. The Select, Insert and Update methods works fine. Here is the code of the classes: public class Car { public string ID {get; set;}//I know this is 3.0+ syntax. public string Description {get; set;}/...

'ObjectDataSource1' could not find a non-generic method 'getCOMDLs' that has parameters:

Getting this error message and I am not able to figure out why. Here is my code: <asp:TextBox ID="searchParam" Width="250px" runat="server"></asp:TextBox><asp:button ID="btnSearch" runat="server" Text="Search" /> <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="getCOMDLs" TypeName="NewEmployee"> <SelectParam...

Object data source select method returning nothing in code call

I have an ObjectDataSource with the proper SelectMethod and SelectParameters configured. The data source is bound to a grid view which successfully displays the data on page load. What I need is the ability to rerun the Select method defined by the ObjectDataSource to be stored in a variable and manipulate the items in it. The issue I k...

How to handle Object Data Source Exception handling in DotNetNuke

I've created several DNN (5.2.3) modules and I'm finding that if an error happens on the object data source (ODS) DNN will then show that error to everyone. A sample (though not a ODS specific error in this case) is shown below. This has no meaning to user. The exception should really be "Thing not found" or something like that to the us...

Using an ObjectDataSource with a GridView in a dynamic scenario

I have a search page that is tasked with searching 3.5 million records for individuals based on their name, customer ID, address, etc. The queries range from complex to simple. Currently, this code relies on a SqlDataSource and a GridView. When a user types a serach term in and presses enter, the TextBoxChanged even runs a Search(ter...

How do I stop my ObjectDataSource from binding twice?

This has been covered a couple of times, without a suitable answer: http://stackoverflow.com/questions/2641156/objectdatasource-firing-twice-or-on-its-own http://stackoverflow.com/questions/651293/objectdatasource-created-twice-when-control-is-changed I have created a custom paging data class that is used with an ObjectDataSource. In...

ObjectDataSource binding concerns

Hi guys - I'm well aware of the general pros (quick, fast, easy, codeless approach; support for paging & sorting) and cons (isolated data logic on presentation side) of ODSs, but I'm wondering about the pros and cons of using multiple ObjectDataSource objects on a page and the cost on memory/performance. I'm currently building a page wh...

.Net ObjectDataSource error: Object does not match target type.

I have an ObjectDataSource on a page that is producing the error "Object does not match target type" when its Insert method is invoked. From Googling this message, I believe this the message is deceptive and I'm actually getting a null reference error on the object that the ObjectDataSource is trying to invoke the method on, but I'm darn...

Why data binding does not remember the old values?

I have a classic ObjectDataSource and a ListView in my page. The List view just displays some data and when switched to edit template it allows the user to change the values. I want the user to edit just some values -- so I bind just these ones in the edit template. The problem is that the other values suddenly turn to nulls or 0. I tri...

Assign a datasourceid to a datagridview asp.net and add select parameters

Hi, I have a datagridview which I assign an objectdatasource to bind data. My selectmethod has a parameter which is assigned at gridview_databinding. The code does not work as expected, using the debugger, it keeps firing the gridview_databinding event and entering the databind method in what seems like an infinite loop. Please help me f...

SelectMethod in objectDatasource getting called multiple times with multiple datapagerfield

Hi all, Ok, so here is the setup. I am building a page that has a listview, a datapager, and 3 datapagerfield (2 x NextPreviousPagerField, 1 x NumericPagerField), and a objectdatasource to tide all of this together. It was all working fine until I put a breakpoint into the SelectMethod specified in the objectdatsource control. It see...

Object Data Source with Reporting Services in Visual Studio

I'm working on a site where we want to include a pie chart on a page. Right now I'm working on implementing that through Reporting Services (RDLC file) with an object data source. The SelectMethod of my object data source is a method that returns a list of business objects; lets say a List<Alpha> and Alpha has a sub object Beta with a N...

Can ObjectDataSource use table-valued parameters

If an ASP.NET web page uses an ObjectDataSource, can you configure it to use a stored procedure that uses table-value parameters? User-defined type: CREATE TYPE [dbo].[integer_list_tbltype] AS TABLE ( [n] [int] NOT NULL, PRIMARY KEY CLUSTERED ) Stored procedure: CREATE PROCEDURE [dbo].[GeneralReport] @intList integer_list_tblty...

Getting the selected row from a ASP.Net FormView bound to ObjectDataSource in the ItemUpdating event

Hello, I have to maintain an ASP.net application in VB.Net. There is a page with a FormView bound to a ObjectDataSource. I have to add some business logic on the ItemUpdating event of this FormView. Unfortunately, some the data that I need to add this business logic is not exposed on the FormView user-interface itself, so I can not us...

Swap/disable ObjectDataSource

I have a GridView which selectively binds to one of two ObjectDataSources. I make the switch in the Page_Load by setting GridView.DataSourceID. One of the data sources has parameters which refer to ControlIDs which don't always exist. Even if it's not set as a DataSourceID, the data source tries to get the values for the ControlIDs, t...

ASP.net objectDataSource

Is it possible to keep the same Method name for both insert and update in ObjectDatasource? I am using Save() method for insert and update.But ObjectDataSource fires Update but does not fire insert. ...

Can crystal reports get data from an object data source?

Can crystal reports get data from an object data source instead of a database? I am using the crystal reports that comes with vs2008. I am coding in c# 3.5. I would like to use an object data source that returns a List< MyClass>. For when we migrate to ssrs in the future, Can ssrs 2008 get data from this object data source ? ...

Is there a Silverlight 4 Equivalent to ASP.NET ObjectDataSource?

Hi All, I'm writing my first Silverlight 4 application and am seeing some differences between RIA Services and the ASP.NET ObjectDataSource. In a Silverlight 4 application, is it possible/advisable to use an ObjectDataSource? We trying to avoid use of a database at this point, since we're prototyping an ASP.NET app in Silverlight. Ho...