This is a migrated thread and some comments may be shown as answers.

configure OpenAccessDataSource in code Behind

3 Answers 86 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
kunal
Top achievements
Rank 1
kunal asked on 12 Aug 2010, 12:48 PM
Hi Friend

I want to configure OpenAccessDataSource in code Behind.............
please help me out........

 <telerik:OpenAccessDataSource ID="OpenAccessDataSource1" runat="server" EnableDelete="False"
        EnableInsert="False" EnableUpdate="False" ObjectContextProvider="SMDS.DataAccess.SMDSContext, SMDS.DataAccess"
        TypeName="SMDS.DataAccess.PhoneNumber" Where="PhoneReferenceId == @PhoneReferenceId AND TableId == @TableId">
        <WhereParameters>
            <asp:ControlParameter ControlID="hfPhoneReferenceId" Name="PhoneReferenceId" PropertyName="Value" />
            <asp:ControlParameter ControlID="hfTableId" Name="TableId" PropertyName="Value" />
        </WhereParameters>
    </telerik:OpenAccessDataSource>

3 Answers, 1 is accepted

Sort by
0
Serge
Telerik team
answered on 13 Aug 2010, 03:33 PM
Hi kunal,

 You can have a look at this quickstart project. In it the locate the DynamicProperties.ascx.cs file. There you will find how to set up an OpenAccessDataSource programmatically. 

I do hope this helps. Please contact us back if you face further trouble.

Regards,
Serge
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Erik
Top achievements
Rank 2
answered on 22 Feb 2013, 12:00 PM
Hi Serge,

The link is broken...

Erik
0
Doroteya
Telerik team
answered on 25 Feb 2013, 11:41 AM
Hi Erik,

Apologies for the inconvenience caused.

Currently, the example that you are looking for is moved from our web site to Telerik OpenAccess Samples Kit and is updated with some of our new features and with our OpenAccessLinqDataSource control.

The OpenAccessLinqDataSource control is designed to replace OpenAccessDataSource. Basically, it supports data binding scenarios in Web Applications based on OpenAccess and internally uses LINQ as query engine, which gives much wider abilities to query data (more about it you can find here). It also implements a variety of events that allow you to configure it in runtime - check this set of articles.

You can download the Samples Kit from here and I suggest that you take a look at the examples in the ASP.NET categories.

I hope that helps. If you have any other questions, do not hesitate to get back to us.


Greetings,
Doroteya
the Telerik team
Q3'12 SP1 of OpenAccess ORM packs Multi-Table Entities mapping support. Check it out.
Tags
Development (API, general questions)
Asked by
kunal
Top achievements
Rank 1
Answers by
Serge
Telerik team
Erik
Top achievements
Rank 2
Doroteya
Telerik team
Share this question
or