Manually perform server inserts

3 posts, 0 answers
  1. Michael
    Michael avatar
    21 posts
    Member since:
    Aug 2008

    Posted 15 Nov 2013 Link to this post

    My RadScheduler is bound to a LinqDataProvider and automatically inserts, updateds and deleted appointments.  Is there a way to perform inserts manually via a server side event?  I have a custom field that I would like saved with each appointment which never needs editing.  Thanks.
  2. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 19 Nov 2013 Link to this post

    Hi Michael,

    To add custom field, which does not need editing you may try to use InsertParameters:
    <asp:LinqDataSource
      ContextTypeName="ExampleDataContext"
      TableName="Products"
      EnableUpdate="true"
      EnableInsert="true"
      EnableDelete="true"
      ID="LinqDataSource1"
      runat="server">
      <InsertParameters>
        <asp:Parameter Name="Category" DefaultValue="Miscellaneous" />
      </InsertParameters>
    </asp:LinqDataSource>

    or set the value programmatically in the LinqDataSource's inserting event. For more details, please take a look at this MSDN help article.

    Regards,
    Hristo Valyavicharski
    Telerik
    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 the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Michael
    Michael avatar
    21 posts
    Member since:
    Aug 2008

    Posted 22 Nov 2013 Link to this post

    That worked perfectly.  Thank you for your help!
Back to Top