This is a migrated thread and some comments may be shown as answers.

Custom Edit with Email, storing Email to Database

1 Answer 78 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Level 2
Top achievements
Rank 1
Level 2 asked on 26 May 2016, 02:39 PM

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?

 


1 Answer, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 27 May 2016, 09:50 AM
Hello,

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.

Regards,
Dess
Telerik
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.
Tags
Scheduler and Reminder
Asked by
Level 2
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or