Custom Edit with Email, storing Email to Database

2 posts, 1 answers
  1. Level 2
    Level 2 avatar
    1 posts
    Member since:
    Mar 2016

    Posted 26 May 2016 Link to this post

    I"m not using datasets but I'm manually doing the updates to the tables. I have the code from the custom edit form and the email working. When the Appointments_CollectionChanging(object sender, NotifyCollectionChangingEventArgs e) is triggered, I assign: 


    var app = (Appointment) e.NewItems[0];


    at this point, using a breakpoint and Watch, I have access to app.Email and the email is displayed. However, during coding, if I type app.Email, I get the
    'Appointment' does not contain a definition for 'Email' and no extension method 'Email' accepting a first argument of type 'Appointment' could be found. Since I'm storing the data myself, how do I create the code to read this value?


  2. Answer
    Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    3825 posts

    Posted 27 May 2016 Link to this post


    Thank you for writing. 

    I suppose that you use the demonstrated approach in the Adding a custom field to the EditAppointment dialog help article. The default Appointment class doesn't have Email property. That is why you can't access it. It is relevant to the AppointmentWithEmail. It is necessary to cast to this type.

    However, if you are still experiencing any further difficulties, it would be greatly appreciated if you can provide a sample code snippet replicating the undesired behavior. Thus, we would be able to investigate the precise case and assist you further. Thank you in advance.

    I hope this information helps. Should you have further questions I would be glad to help.

    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
Back to Top