Questions tagged [objectdatasource]

ObjectDataSource control acts as a data interface for databound controls such as: GridView, Repeater, FormView and DetailsView.

618 questions
52
votes
5 answers

Paging & Sorting grids with ASP.Net MVC

I'm new to MVC, and am not following how you'd do paging and sorting on a grid. I'm used to using the asp.Net GridView control with an ObjectDataSource pointed at objects in our business layer - and in that case the ODS handles all of the paging &…
Scott Ivey
  • 40,768
  • 21
  • 80
  • 118
35
votes
2 answers

GridView bound with Properties of nested class

I have an object map similar to what's listed below. When I try to bind the properties of NestedClass in a GridView I get the error: "A field or property with the name 'NestedClass.Name' was not found on the selected data source." The GridView is…
Ant Swift
  • 20,089
  • 10
  • 38
  • 55
21
votes
2 answers

How do I set up ObjectDataSource select parameters at runtime

I'm trying to add parameters to an objectDataSource at runtime like this: Parameter objCustomerParameter = new Parameter("CustomerID", DbType.String, customerID); Parameter objGPDatabaseParameter = new Parameter("Database",…
TheEmirOfGroofunkistan
  • 5,476
  • 8
  • 37
  • 53
18
votes
6 answers

Visual Studio won't update properties of my Data Source

I am using my class "Invoice" as a Data Source. But after adding more properties to it, Visual Studio refuses to refresh the data source and I can't find the new properties in my data source. Tried restarting project, deleting and adding object as…
16
votes
4 answers

SqlDataSource vs ObjectDataSource

If a web page needs some data, why not just have a SQLDataSource call a stored procedure? Why use an ObjectDataSource to call a business object that then calls the stored procedure? I understand that other apps (lets say desktop apps) built on the…
Dumb Questioner
  • 2,147
  • 4
  • 20
  • 21
15
votes
4 answers

How to sort using GridView and ObjectDataSource?

I have a GridView with an ObjectDataSource and I want to be able to sort it. Paging works correctly, however Sorting gives me an exception: The GridView gridView fired event Sorting which wasn't handled. How do I enable sorting on the server…
Jonathan Mitchem
  • 953
  • 3
  • 13
  • 18
11
votes
4 answers

Storing array of integer values in SQL Server

i want to store an array of integer values in a SQL database table (SQLServer 2005), if possible by using a single column. The integer array will have a length of 7560 values. I am using a objectdatasource, the datatype should be compatible with the…
spoekes
  • 833
  • 3
  • 8
  • 14
11
votes
5 answers

Can't see or add Website Data Sources in RDLC report in ASP.NET MVC

In the RDLC report, in Design view in Visual Studio 2008, we don't see anything in the Website Data Sources tab and the button to Add New Data Source is grayed out. Only the Refresh button is enabled, and clicking it doesn't do anything. Our…
RobertC
  • 323
  • 1
  • 3
  • 12
10
votes
7 answers

How to get row count of ObjectDataSource

Hello you all How can i get row count of ObjectDataSouce ? I use ObjectDataSource and DataList . I want show some thing to the user for example in a label when there are certain row returned by ObjectDataSource . One of situation is when there is…
Mostafa
  • 3,002
  • 10
  • 52
  • 79
9
votes
3 answers

Using generic classes with ObjectDataSource

I have a generic Repository class I want to use with an ObjectDataSource. Repository lives in a separate project called DataAccess. According to this post from the MS newsgroups (relevant part copied below): Internally, the ObjectDataSource…
Brant Bobby
  • 14,956
  • 14
  • 78
  • 115
8
votes
4 answers

SSRS: Master-detail report with two datasources

I have two local data sources that I can push into the report. Works no problem. But how do I set up the report? One data source contains a list of employees, and info about them. The other contains a bunch of working hours for each employee. I…
Svish
  • 152,914
  • 173
  • 462
  • 620
8
votes
3 answers

Return Custom Object from Entity framework and assign to Object Data Source

I need some guidance with an issue, I am using Entity Framework 4.0, I have a DAL and BLL and am binding to ObjectDataSource on the page. I had to write a stored procedure using PIVOT and dynamic SQL to return the data from multiple entities the…
8
votes
3 answers

When using an object database, how do you handle significant changes to your object model?

If you use an object database, what happens when you need to change the structure of your object model? For instance, I'm playing around with the Google App Engine. While I'm developing my app, I've realized that in some cases, I mis-named a class,…
Deane
  • 8,269
  • 12
  • 58
  • 108
7
votes
5 answers

ASP.Net 2.0 Application without Business Logic Layer?

Is it "acceptable" to have an ASP.Net 2.0 application without the BLL (Business Logic Layer) as the following? SQL Server Data Storage & Stored Procedures Data Link Layer (Strongly Typed Table Adapters) connecting to Stored Procs Presentation Layer…
Ciro Villa
  • 71
  • 1
  • 2
  • 6
7
votes
5 answers

Gridview Paging via ObjectDataSource: Why is maximumRows being set to -1?

So before I tried custom gridview paging via ObjectDataSource... I think I read every tutorial known to man just to be sure I got it. It didn't look like rocket science. I've set the AllowPaging = True on my gridview. I've specified PageSize="10" on…
octechnologist
  • 163
  • 2
  • 8
1
2 3
41 42