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

Appointments is not saved

5 Answers 79 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Muhammad
Top achievements
Rank 1
Muhammad asked on 01 Sep 2015, 07:42 AM

Hi,

 i'm a newbie in c# or telerik. i'm using the RadScheduleView and try to edit the appointment by double-clicking time and the appointment dialog is appear, after i click OK the new appointment is now appear in UI. But after i close the app and run it again, the schedule is empty. why? 

what is the best way to save my appointment?

 

5 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 03 Sep 2015, 09:25 AM
Hi Muhammad,

In order to save the created Appointments during run time and load them with the loading of the application we suggest you to use some DataBase. So, basically when you close your application all new created appointments should be added to the database and when you star it again the saved in the database appointments will be read from it and loaded inside RadScheduleView.

We have a detailed information in our help documentation about binding RadScheduleView with DataBase:
​http://docs.telerik.com/devtools/wpf/controls/radscheduleview/populating-with-data/binding-to-database/binding-to-db-overview

Please, check also the following sample project from our online SDK Repostitory that demonstrates how to bind RadScheduleView to a database. The example consist of RadScheduleView and a Button. When you press the button all Appointments will be saved inside the Database and when the application is run again all the appointments will be visualized as expected:
https://github.com/telerik/xaml-sdk/tree/master/ScheduleView/Database

Hopes the provided information will help you.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Muhammad
Top achievements
Rank 1
answered on 04 Sep 2015, 05:51 AM

Hi Nasko,

thanks for your answer, actually i intend to make a file (class or txt or anything) that after i made appointment from the Dialog it will write in that file like

Subject = "abc"
Start = new DateTime(xxxx,xx,xx)
End = new DateTime(xxxx,xx,xx)

 something like that, and everytime i start again it will load from that file.

 is that possible?

 Thanks.

0
Nasko
Telerik team
answered on 04 Sep 2015, 02:10 PM
Hello Muhammad,

Sorry for the misunderstanding. Indeed you could achieve the desired functionality using a FileReader and Writer to read the text into the file and write it back again. 

So, basically you will need to read the text from the file and using some implemented custom logic to create an Appointment from the read Text. Also, when a new Appointment gets created you need to add it to the file using some file writer.

We have created a sample project that demonstrates the described above approach using XamlReader and XamlWriter in order to write the appointments into a .xaml file.

Please, give it a try and let us know if it worked for you.

Hopes this helps.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Muhammad
Top achievements
Rank 1
answered on 08 Sep 2015, 07:01 AM

i still have to learn about the code and still dont understand some of it, but it works thank you so much.

i will post here if i have another question about it :)

0
Nasko
Telerik team
answered on 08 Sep 2015, 08:26 AM
Hi Muhammad,

I am glad the proposed approach worked for you and fits your requirements.

Please, do not hesitate to contact us if you have any additional questions concerning the proposed approach or some of the other Telerik controls.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ScheduleView
Asked by
Muhammad
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Muhammad
Top achievements
Rank 1
Muhammad
Top achievements
Rank 1
Share this question
or