I've got a Payment class with delete, insert methods.
public class Payment
{
public int Id { get; set; }
public int UserId { get; set; }
public string Fullname { get; set; }
public DateTime Date { get; set; }
public double Sum { get; set; }
public string PaymentType { get; set; }
public string RecordInfo { g...
i have an instance of ObjectDataSource with specified update method. But on update i have an old values(previously set in gridview) in method - they are not updating.
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="DeletePayment"
InsertMethod="InsertPayment" SelectMethod="GetPayments" T...
protected void objUpdating(object sender, ObjectDataSourceMethodEventArgs e)
{
e.InputParameters.Add("update_name", "xxx");
}
Hi, I am trying to make Update method for ObjectDataSource, which has argument "update_name" but adding parameter to collection using add method throws an exception of dictionary ( key value ) i...
I've a form view with various field in edit and an object datasource where I've defined my update parameters that my update method takes. I've set some of the fields in the edit template to read only because I want them to display.
Unfortunately they are getting passed in as update parameters somehow to my objectdatasource.
So, it is ge...
Working with .NET 2.0, I have a FormView with fields bound to an ObjectDataSource (ODS). Those fields start out with the correct values—that is, they come from the Person object when the ODS’s SelectMethod is called—but after making changes and calling the ODS’s UpdateMethod, I can’t get these new—or any—values from the fields from anyw...
Howdy,
Recently I returned to ASP.NET WebForms programming and I've come across a problem that I'm sure was not an issue previously.
I have a Customer object with and Address object, I can bind up to all the properties of the customer (including the address for display) but when the formview binds back it throws an exception say that...
I'm trying to upgrade some Sharepoint 2007 webparts to SP2010 using the web part projects built into Visual Studio 2010. Namely, I'm using Visual Web Part to migrate our existing controls, which make extensive use of ObjectDataSource. However, when adding an ODS to the control in the Visual Web Part project, it will not pick up objects i...
Hi, I want to sort my gridview binded to an object datasource fetching business objects. I have already implemented custom paging & now want to implement sorting. Just read this article but there is lot of concatenation going on there with the SQL Query. Any other elegant solution guys ?
http://aspnet.4guysfromrolla.com/articles/032206-...
So, the context of this question is pretty specific, but I think there is a general C# question struggling to get out. :)
I have an ASP.NET Web Forms page with a GridView control bound to an ObjectDataSource. The data source control is hooked to a data access class that, in turn, uses LINQ to query Entity Framework v4. The methods on t...
I am trying to hook up custom pagination with an ObjectDataSource to my GridView. However, this thing renders no data, but does render the column headers. The debugger clearly indicates a populated DataTable being returned:
<asp:GridView ID="GridView1" runat="server" DataSourceID="ObjectDataSource1" AllowPaging="True" />
<asp:ObjectDat...
Hello all.
I have the following bit of code that gives me the number of rows in a gridview bound to an object data source.
protected void odsProduct_Selected(object sender, ObjectDataSourceStatusEventArgs e)
{
lblHowManyRows.Text = ((List<tblProduct>)e.ReturnValue).Count.ToString();
Lovely.
However, how would I g...
Hello all.
I have the following scenario I would like to implement.
I have a number of drop downs that the client can select a range of criteria. From this, they will press a button, the query will be generated and low and behold, a gridview will be produced in a new window (or at least give that impression) bound by an object datasour...
Hello. I use ObjectDataSource and bind IEnumerable[Person] to my DevExpress GridView
class Person
{
private int Id {get; set;}
public string Name {get; set;}
}
At grid there are two columns Id,Name. I want new column "Sum", which is calculated by person object(aggragate by person). At asp.net I create new column and calculate i...
I have the following situation:
My business class:
public class Foo
{
public String A {get;set;}
public DateTime B {get;set;}
// .. and other properties like
public String Intern {get;set;}
}
I'm binding that Item to a DetailsView in Editmode. (I bind a List containing a single object of Foo, becuase I do recall that I can only b...
Is it possible to get to the object that an ObjectDataSource creates when calling the select function? Not the result of the select function itself but the object that is creates from the parameter specified in TypeName.
I would like to call some other functions on that same instance after Select is called.
The other solution would be ...
So, this question may be a little vague, but I have constant discussions about it:
When designing an Asp.Net page, a lot of times you might just want to throw a quick and dirty GridView on the page. When you are going that route you have the various datasource options (I typically use ObjectDataSource tied to a business object) and you...
Hi
How would I do what Scott has done in one call using nHibernate 2 ObjectDataSource
http://weblogs.asp.net/scottgu/archive/2006/01/07/434787.aspx
below is my Data access method
public IList GetListOfUser(int rows, int pageIndex) {
IList userList = null;
using (ITransaction tx = _session.BeginTransaction(...
Hello,
I have a page with some datasources in it. I am doing reenginering of the page itself and would like to split some parts of the page in several user controls.
In my code I have an ObjectDataSource object with the following params
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
TypeName="DataSetTableAdapters.Photos...
Tell me if this is even possible:
I have a gridview bound to an ObjectDataSource providing me with data from a database. I'm filling the Objectdatasource using Linq-to-entities. Typical setup where I'm supplying the columns and rows.
Below I have a horrible graphical representation.
x_col x_col x_col
x_row| x_data ...
I have a ASP.NET page that contains a formview and ObjectDataSource. On the page I only have 4 fields that are bound to fields in my datasource. My datasource contains 10 fields. When I call an update it is setting the 6 fields I am not binding to to null. The only way I can find it get around this is to add hidden fields for the 6 u...