configure OpenAccessDataSource in code Behind

Thread is closed for posting
4 posts, 0 answers
  1. kunal
    kunal avatar
    11 posts
    Member since:
    Jan 2009

    Posted 12 Aug 2010 Link to this post

    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">
                <asp:ControlParameter ControlID="hfPhoneReferenceId" Name="PhoneReferenceId" PropertyName="Value" />
                <asp:ControlParameter ControlID="hfTableId" Name="TableId" PropertyName="Value" />
  2. Serge
    Serge avatar
    375 posts

    Posted 13 Aug 2010 Link to this post

    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.

    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
  3. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 22 Feb 2013 Link to this post

    Hi Serge,

    The link is broken...

  4. Doroteya
    Doroteya avatar
    498 posts

    Posted 25 Feb 2013 Link to this post

    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.

    the Telerik team
    Q3'12 SP1 of OpenAccess ORM packs Multi-Table Entities mapping support. Check it out.
Back to Top