objectdatasource

Databinding ObjectDataSource inner List<T> property with Gridview

Hi Everyone, I have a Nhibernate Repository which I use with a Object DataSource to bind Job Objects (shown below) to various controls on a Asp.Net page. So far I've not had any problems binding, until I wanted to bind the inner IList of Tasks contained in the Job Object: Specifically I want to bind the Tasks list to a Gridview, So ...

GridView not Rebinding Properly After Postback

I have a GridView that has a DataSourceID pointing to an ObjectDataSource. The ObjectDataSource points to a method that returns a LINQ IQueryable by using the TypeName, SelectMethod, and SelectCountMethod properties of the ObjectDataSource control. What happens is that the data loads properly upfront. However, on postback, if I remove th...

Why does ObjectDataSource.DataBind() return rows, while ObjectDataSource.Select() doesn't?

Hi I thought calling ObjectDataSource.Select() gives the same results as calling ObjectDataSource.DataBind(), but in some cases that doesn’t seem to be true: <asp:ObjectDataSource ID="ODS1" TypeName="PersonDB" SelectMethod="GetPeople" runat="server"></asp:ObjectDataSource> <br> <asp:ListBox ID="ListBox1" DataSourc...

Consolidated discussion: LinqDataSource or ObjectDataSource?

I've a moderate-scale web-app with an SQL-Server based backend DB. My DB overview - http://stackoverflow.com/questions/1667802/generic-suggestions-for-sql-2005-framework-design-and-implementation My App framework overview - http://stackoverflow.com/questions/1729199/l2s-linq-to-sql-or-ef-entity-framework So, for now as we'...

ObjectdataSource Inserting event not firing up ?

Hi I have an objectDataSource and i am trying to pass an object as parameter in its Inserting event. For some reason the "Inserting" is not getting fired up before Insert is called. It is not getting into ObjectDataSource1_Inserting(object sender, ObjectDataSourceMethodEventArgs e) Event block for some reason. Any idea ? Here is the...

updating dataset c# asp

Hi, I have written some logic in C#. Now I need to update it to the already created Dataset. The Dataset is containing a Table PackageTable. It has two fields, PackageId, and PackagePrice Now, I want to search the table for certain Packageid, say 'P1' and update the PackagePrice with a new value , say '100'. Please tell me how to do it ...

Anemic Domain Model and the ObjectDataSource

I recently realized that I'm creating my n-tier applications using the Anemic Model, Which many would argue is not the proper OO way of doing things (and that it is actually an anti pattern). So I'm now trying to apply the Domain-Driven Design instead. I'm used to using the objectdatasource to bind controls, such as the grid view, to m...

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 no record . Thank you . ...

Sorting in listview with object data source

Hi i am working in asp.net web application for social networking. i have sued VS2008 and sqlserver 2008[.net 3.5] in this website we user 3-tier architecture. so we passed businessobject to UI. My listview is binded with object data source. now i have to implement sorting in listview. please can anyone suggest me best method to do sort...

Using DataObjectTypeName in DataObjectSource

The functionality I am trying to use is: - Create a ObjectDataSource for selection and updating controls on a web page (User Control). - Use the DataObjectTypeName to have an object created that would send the data to an UpdateMethod. - Before the values are populated in the DataObjectTypeName’s object, I would like to pre-populate th...

Creating Data Source for Entity Data Model

I am trying use MySql and Entity Framework, using Connector/Net 6.1 with this as a reference: http://dev.mysql.com/doc/refman/5.4/en/connector-net-tutorials-entity-framework-winform-data-source.html However my project is WebApplication instead of WinForms. I have sucessfully created entities, but I am not able to cerate Data Source fo...

ObjectDataSource and Inserting event

Hi, I have an ObjectDataSource and one of the fields is actually another object/complex type. Knowing that the ODS does not support complex objects natively, I want to capture the Inserting event to "treat" my parameters. My problem is that an exception is thrown before the Inserting event starts: Exception Details: System.InvalidOper...

C# Object Data Sources

What determines if an object is available in the Data Configuration Wizard? I have the following class in my BLL and I want to be able to bind controls to the data table I turned into a property but the only thing that shows up in the list of available data sources is the class name. public class AoiNameBLL : SeedSizerDs { private a...

GridView sorting doesn't work when I Enable Caching in Custome Paging and sorting

Hi , I have a GridView that use a stored procedure for custom paging and sorting . It's OK and works fine (Both paging and sorting) , But the problem is when i Enable Caching in ObjectDataSource like : EnableCaching="True" It properly cache every page that the user visit , But at this case when the user want to sort it raise an e...

Listview with objectdatasource Delete not working

Hello, i have one Listview in my Usercontrol & 1 objectdatasource binded with the ListView. now in objectdatasource's Deletemethod i have taken businessobject as argument but at runtime i am not getting value in my businessobject's properties... i also tried to use "Bind" instead of "eval" in ItemTemplate. but not getting any value at ...

GridView and ObjectDataSource problem

Here's the problem I'm having in my asp project. My shopping cart consists of 3 classes like the picture below. The class Carrinho has a List of Arranjo wich by itself has a List of Product. Now I want to display the Carrinho's list and I have a GridView whose data source is an ObjectDataSource that's associated to the Carrinho objec...

Inserting via DetailsView and ObjectDataSource when InsertParameter is Object

Hi , It's my first use of DetailsView . I'm trying to use DetailsView and ObjectDataSource for Inserting/Editing records . My ObjectDataSource invoke a method in BLL which parameter of that method is an Object .When I go through ObjectDataSource Configuration Wizard i choose appropriate method for CRUD . The ObjectDataSource is like ...

Why in "Configure Data Source" when i choose "Parameter source :Control" all ControlIDs are duplicated?

Hi , I don't know it happen just to me or Others have the same situation too . All the time when i bind a DataControl to an ObjectDataSource in "Configure Data Source" wizard of ObjectDataSource,when i set parameter source as "Control" in "ControlId" DropdownList there are TWO Item of every control in the WebForm , while it make sense ...

How do I implement sorting for a custom return type from a linq-to-sql query?

I am using a repository class with linq-to-sql as the objectdatasource for a (web) GridView. The GridView has to allow sorting on all columns. I have a working solution using this approach but I would obviously prefer to do this without a predefined list of sort expressions. public class TrailerMovementRepository { private TrailerMo...

ASP Controlparameter in Object Datasource

Hello, any help on this one will be appreciated.. I use a form for clients to provide them a way to upload their books to a web application. The clients should be able to upload an image of a book as well. Just before inserting the book to the database i try to get the image file name and store it a control parameter,in its default ...