Implementing CRUD server side

5 posts, 0 answers
  1. Paul
    Paul avatar
    56 posts
    Member since:
    Nov 2010

    Posted 22 Dec 2011 Link to this post

    Hi. I'm using the scheduler control and would appreciate some help.

    Ultimately I would like to implement a custom form to create and edit events but for now the standard forms are fine. However, the data isn't stored in a simple single table and it would be impossible to write an sql to act as a datasource to load the scheduler.

    I can build the data in code behind and bind it. That's fine and I'm ok doing that. However, how do I reference the recordId/datakey in events like appointInsert or appointmentDelete? If I have a recordId (primary key in the underlying table) I obviously want to store that in the Appointment and access it in the update/delete event code.

    Thanks
  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 22 Dec 2011 Link to this post

    Hello Paul,

    The Binding to Generic List demo shows how to handle AppointmentUpdate/Insert/Delete and update the data source for RadScheduler.


    All the best, Peter
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. Paul
    Paul avatar
    56 posts
    Member since:
    Nov 2010

    Posted 22 Dec 2011 Link to this post

    Works perfect thanks. Sometimes you miss the obvious and I had missed the ID property

    Thanks for your very quick help and Happy Christmas
  4. Paul
    Paul avatar
    56 posts
    Member since:
    Nov 2010

    Posted 22 Dec 2011 Link to this post

    Hi Peter, I have one further question. I'm just implementing code and wrote code to handle the AppointmentUpdate event. I am assuming that this is fired when an appointment is editted. The code works fine except for the code that tried to block an edit in certain circumstances. In the code I just set e.Cancel = true;  However, this seems to have no affect. How should I block/reverse edits or changes?
    Thanks, Paul
  5. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 26 Dec 2011 Link to this post

    Hello Paul,

    This is strange, since AppointmentUpdate and AppointmentInsert are canceled conditionally in this demo which works as expected. Is your implementation similar? Do you use the latest version from Q3 2011 or any other version?


    Kind regards, Peter
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top