objectdatasource

Does Telerik Reporting support Business Object Datasources?

I have a requirement to use business objects to call strongly typed table adapters in a three tier model. I also have a requirement to use Telerik reporting, which I didn't see any examples of online. I just see simple examples of creating a simple select to Northwind and connecting the report directly to that. I am using 2008 Q3 of T...

How to Sort on a GridView using ObjectDataSource with TemplateFields

Background: I am working with a GridView and an ObjectDataSource. I am implementing Paging and Sorting. On the ObjectDataSource: objectDataSource.TypeName = value; objectDataSource.SelectMethod = "Select"; objectDataSource.SelectCountMethod = "SelectCount"; objectDataSource.SortParameterName = "sortExp...

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 side? (i.e., gridView.EnableSortingAndPagingCallbacks must remain "false") ...

ASP.Net User Control

I'm trying to build an ASP.net user control that uses a Repeater to iterate over a number of items in an ObjectDataSource that I need to pass in to the user control. I'm not sure how to pass the object data source in though. Any one know how to do this? ...

ASP.NET DataSource & GridView databinding, setting a parameter value programmatically

So, I have a GridView with an ObjectDataSource, and I want to programmatically set one of the SelectParameters of the ObjectDataSource. I tried (during both Page_Load and DropdownList__SelectedIndexChanged) objectDataSource.SelectParameters["my_parameter"].DefaultValue = "my_value"; objectDataSource.DataBind(); but it didn't work. Wh...

what characters should be escaped in sql string parameters

I need a complete list of characters that should be escaped in sql string parameters to prevent exceptions. I assume that I need to replace all the offending characters with the escaped version before I pass it to my ObjectDataSource filter parameter. ...

FilterExpression Does Not Work? Why?

Hi, ObjectDataSource1.FilterExpression = "userid LIKE '{0}' AND action LIKE '{1}'"; ObjectDataSource1.FilterParameters.Add("userid", ddlUsers.SelectedValue); ObjectDataSource1.FilterParameters.Add("action", ddlAction.SelectedValue); I wirte like this code. when I run it grid view is empty. BUT, when I write and run it works good. Ob...

ObjectDataSource DataObjectTypeName Help. Pass object as parameter

I have a partial class (the main class is a LinqToSql generated class) <DataObject(True)> _ Partial Public Class MBI_Contract <DataObjectMethod(DataObjectMethodType.Select, True)> _ Public Shared Function GetCancelableContracts(ByVal dealer As Dealer) As List(Of MBI_Contract) Return Utilities.GetCancelableContractsFor...

GridView with nested business objects

I have an object similar to what's listed below. When I try to access the properties of the nested business object, I get the error: A field or property with the name 'Prop2.Property1' was not found on the selected data source. The gridview is bound to an objectdatasource if that is important. Is there any way around this? Sample cl...

Why does ObjectDataSource send an empty DataObjectTypeName to UpdateMethod?

I'm trying to use an ObjectDataSource with a custom DataObjectTypeName (Person), and an UpdateMethod (PersonManager.Instance.Update(Person p)) I'm using a GridView for display, and each column in the GridView has an EditItemTemplate. My problem is that the ObjectDataSource is sending an empty Person object to my UpdateMethod. Am I su...

Problem: Sorting for GridView/ObjectDataSource changes depending on page

I have a GridView tied to an ObjectDataSource using paging. The paging works fine, except that the sort order changes depending on which page of the results is being viewed. This causes items to reappear on subsequent pages among other issues. I traced the problem to my DAL, which reads a page at a time and then sorts it. Obviously the...

Understanding ObjectDataSource and Select Parameters

I have in a GridView control a TemplateField like: <asp:TemplateField ItemStyle-Width="150px"> <ItemTemplate> <asp:DropDownList ID="ddlFields" runat="server" DataSourceID="odsOperator" DataTextField="Text" DataValueField="Value" /> <asp:HiddenField ID="hfFieldType" runat="server" Value='<%# Eval("FieldType")%>' /> </It...

ASP.net GridView and Object DataSource

How can I configure a ASP.NET GridView to populate it by an Object DataSource where the object method needs a noticeCode to pass by the C# code? StudentControlPanel.aspx.cs protected void Page_Load(object sender, EventArgs e) { string username = (string)Request.QueryString["username"]; Student std = Student.GetStud...

Add Controls to Panel after FormView insert help

Here's my HTML <asp:UpdatePanel runat="server" ID="panel1" UpdateMode="Conditional"> <ContentTemplate> <asp:FormView runat="server" ID="formViewUno" DataSourceID="odsBob" DefaultMode="Insert"> <InsertItemTemplate> <span>Name:</span> <asp:Lite...

Is this the only way we can force ObjectDataSource to…?

Greetings, 1) I assume ObjectDataSource automatically binds to data source only on first request, but not on postbacks ( else ObjectDataSource.Selecting event would be fired on postbacks also, but it isn’t): A) So only way to force ObjectDataSource to also bind on postbacks is by manually calling DataBind()? 2) Assuming DropDownL...

Data binding and user controls

Hello, This is really bugging me, so I hope someone can help me a bit 1) Assuming page contains user control, then *Page.Page_Load* is fired prior to *UserControl.Page_Load*: a) I assume that if Page contains ObjectDataSource1 control, then ObjectDataSource1 will perform data binding prior to *UserControl.Page_Load*?! b) If that...

Objectdatasource and Gridview : Sorting, paging, filtering

Hi there, Im using entity framework 1.0 and trying to feed out a Gridview with a objectdatasource that have access to my facade. The problem is, that it seems to be particulary difficult and haven't seen anything that realy do what i want it to do on the internet. For those who know, a gridview feeded with an objectdatasource, it can'...

ObjectDataSource.Select with Parameters Time Out

I'm using an ObjectDataSource with a 2008 ReportViewer control and Linq to CSV. The ODS has two parameters (the SQL is spelled out in an XSD file with a table adapter). The Reportviewer takes a very long time to render the output after a button is clicked to generate the report. That's my first problem. Even though it works (most of the ...

Must I use parameters with an ObjectDataSource update?

I have a business object that I've been using, which has a bunch of properties and a Save method, which inserts/updates to the database. The save method is NOT status, so the object needs to be instantiated, and the properties for the DB update/insert get pulled from the object. Now I'm trying to bind the object to a FormView with the O...

Bind repeater to a list of files and/or folders

I would like to create a very simple image gallery. I am trying to figure out how to bind a Repeater to some kind of a custom object that would return back a list of files and/or folders. Can somebody point me in the right direction? UPDATE: Here's what i have so far, please let me know if there's a better way to do this ListView to d...