OA and RadGrid

7 posts, 0 answers
  1. Jeff
    Jeff avatar
    51 posts
    Member since:
    Aug 2007

    Posted 05 May 2009 Link to this post

    I've been trying for days to get automatic delete, update and insert working through RadGrid and have not had any success. The Grid displays the data but editing and deleting have not effect and there is no "Add Record" button.

    I've read the various OpenAccess pages that show how to work with the OpenAccessDataSource control, including:


    Complicating things further, these documents are full of errors. For example, the RadGrid designer doesn't have checkboxes for automatic insert, update, and delete.

    Can you go through the steps in the first document and tell me what additional steps are required to get Insert, Delete and Update working?

    Thanks,
    Jeff
  2. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 08 May 2009 Link to this post

    Hello Jeff,
    the settings are available in the RadGrid properties panel which can be accessed by pressing F4 when the grid is selected. There are 3 options that need to be set to true:
    AllowAutomaticDeletes
    AllowAutomaticInserts
    AllowAutomaticUpdates
    You can do this by pasting the following code in the RadGrid tag in the aspx of your page.
    AllowAutomaticDeletes="True" 
    AllowAutomaticInserts="True" 
    AllowAutomaticUpdates="True" 
    As for the Add record button in the grid you will need to Add the following code in the MasterTableView tag of the RadGrid:
    CommandItemDisplay="Top" 
    I hope that my response has helped you. If you face any further difficulties please do not hesitate to contact us.

    Sincerely yours,
    PetarP
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
  3. DevCraft banner
  4. Jeff
    Jeff avatar
    51 posts
    Member since:
    Aug 2007

    Posted 08 May 2009 Link to this post

    Hi Petar,

    Thanks for your help.

    The CommandItemDisplay got me the "Add Record" button. After making my ID and Version fields public and adding datakeynames="OrderID" to MasterTableView, I got it working.

    Jeff
  5. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 11 May 2009 Link to this post

    Hello Jeff,
    we are happy that we could assist you. If you face any further difficulties please do not hesitate to contact us.

    Greetings,
    PetarP
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. rose pink
    rose pink avatar
    1 posts
    Member since:
    Aug 2009

    Posted 27 Aug 2009 Link to this post

    Wow, What you wrote is so smart and meaningful ! Thanks alot !

    [url=http://simulationcreditauto.org][color=#FFFFFF][u]simulation rachat
     voiture pret automobile taux calcul credit auto[/u][/url][/color]
    [color=#FFFFFF]Une simulation credit auto instannee et facile ici si vous
     avez une voiture[/color][url=http://simulationcreditauto.org][color=#FFFFFF]
    [u]simulation rachat voiture pret automobile taux calcul credit auto[/u]
    [/url][/color]
  7. rent
    rent avatar
    36 posts
    Member since:
    May 2008

    Posted 13 Jan 2010 Link to this post

    Hello ALL!!!

    In the project sample http://www.telerik.com/community/code-library/orm/general/presenting-1-n-relations-with-hierarchical-radgrid-and-openaccess.aspx I give the error It was not possible to cast object of type"Telerik.OpenAccess.OpenAccessDataSource" to type "System.Web.UI.DataSourceControl".

    Anybody know why this happen and how to fix this?

    Thanks in advance!!!

  8. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 15 Jan 2010 Link to this post

    Hi rent,

    This seems to be a problem in the RadGrid implementation which is already fixed in the latest version. The Code library example is updated and now it should work as expected. We are sorry for the inconvenience.

    Regards,
    Damyan Bogoev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
DevCraft banner