Questions tagged [objectdatasource]

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

618 questions
3
votes
1 answer

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…
aztekman
  • 31
  • 2
3
votes
2 answers

gridview + objectdatasource selectmethod called twice

i have gridview with lots of records, so had to use ObjectDataSource so as to fetch only the records that will be displayed on the page i.e. if there are total 100 records, and page size is 10, on each page click only 10 records are fetched from…
user166013
  • 1,411
  • 4
  • 21
  • 37
3
votes
2 answers

GridView with ObjectDatasource UpdateMethod

I have an ASP.NET WebForms page containing an ASPxGridView and an ObjectDataSource:
Henk Mollema
  • 44,194
  • 12
  • 93
  • 104
3
votes
0 answers
3
votes
1 answer

GridView with ObjectDataSource Show Footer on Empty Data

There is no ShowFooterWhenEmpty property in GridView ;( When I didn't use ObjectDataSource for data binding it was as simple as: ... SqlDataAdapter adapter = new SqlDataAdapter(cmd); DataTable data = new DataTable(); conn.Open(); …
master-lame-master
  • 3,101
  • 2
  • 30
  • 47
3
votes
1 answer

"not-null property references a null or transient value" when deleting an object

Using ASP.NET/C#/fluent Hibernate architecture, I am trying to use a GridView and ObjectDataSource to manage my business objects. I have a main class Project with a one-to-many relationship with OIC - simplified mappings and classes below. // OIC…
Brett
  • 1,267
  • 1
  • 13
  • 21
3
votes
0 answers

Configuring ObjectDataSource: Exception has been thrown by the target of an invocation

In my project in Visual Studio 2010, I'm trying to add an Object Data Source which points to one to my business services, and to bind the datasource to a datagrid (or datalist, or whatever). The problem is, after adding the ObjectDataSource from the…
3
votes
1 answer

SPGridView, data and correct method of ensuring data is safe

I am using an SPGridView to present some data, and have enabled the filtering ability which works very well. Until you choose a particular item in the data to filter on... The data item in question has an apostrophe in the string( e.g. "this is…
user32826
3
votes
2 answers

asp.net how can ObjectDataSource access System.Web.UI.Page objects

I use ObjectDataSource as below.
Frank Myat Thu
  • 4,448
  • 9
  • 67
  • 113
3
votes
1 answer

How do you save items from a CheckBoxList in a FormView?

I am using a CheckBoxList inside of a FormView with an ObjectDataSource. In order to bind the selected values to the CheckBoxList I am using the FormView_DataBound event to find the CheckBoxList and set the selected items. This works fine. Now…
Bob
  • 97,670
  • 29
  • 122
  • 130
3
votes
1 answer

ObjectDataSource fails to parse string to DateTime

I have a textbox with value that stores ValidFrom form value: 31.01.2012 and cultures set to: in web.config. And now, ObjectDataSource update method: public static void UpdateLac(int id,…
dragonfly
  • 17,407
  • 30
  • 110
  • 219
3
votes
1 answer

ObjectDataSource does not find SelectCountMethod

I am trying to use the ObjectDataSource with enabled paging. This requires me to use the SelectCountMethod (so the grid can know how many pages there are). My ObjectDataSource looks like this:
Gluip
  • 2,917
  • 4
  • 37
  • 46
2
votes
1 answer

Access to output parameters when ObjectDataSource retrieves data from cache

I have an ObjectDataSource that it has an Output Parameter in its select method. And my ObjectDataSource is enabled caching. When ObjectDataSource retrieves data from database, I have access to output parameter in ObjectDataSource_Selected…
Ali Gonabadi
  • 944
  • 1
  • 10
  • 28
2
votes
1 answer

ObjectDataSource Insert Method

I have an ObjectDataSource that I'm binding to a DetailsView control. I have the insert method written in a business layer (which calls down into a data layer) and everything works fine.. until i want to do something else before the insert method…
Tone
  • 2,793
  • 6
  • 29
  • 42
2
votes
1 answer

When is DataBind called automatically on an ASP.NET page?

I have a GridView on a page with a search button. The GridView is not visible to start with so that the user must click search before results are retrieved. The DataSourceID is set to the ID of an ObjectDataSource. When click is called, the…
Colin
  • 22,328
  • 17
  • 103
  • 197