I am pretty new to RadCalendar.
How can I bind RadCalendar to a local database?
The aim is for the RadCalendar to show the Database inputs.
Any Help will be appreciated
Regards
1 Answer, 1 is accepted
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 09 Feb 2015, 12:26 PM
Hello Pelumi,
Thank you for writing.
RadCalendar offers FocusedDate property which indicates the current selection. If I understand your requirement correctly, you are trying to bind a DateTime property coming from the data base to the RadCalendar. For this purpose you can use simple data binding. Here is a sample code snippet demonstrating how to bind the RadCalendar.FocusedDate property to the custom Item.CreatedOn property. When you update the custom object's property, the RadCalendar.FocusedDate property will be refreshed:
public Form1()
{
InitializeComponent();
Item item = new Item(123,"Custom Item", new DateTime(1990,04,25));
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
public int Id
{
get
{
return this.id;
}
set
{
this.id = value;
OnPropertyChanged("Id");
}
}
public string Name
{
get
{
return this.name;
}
set
{
this.name = value;
OnPropertyChanged("Name");
}
}
public DateTime CreatedOn
{
get
{
return this.createdOn;
}
set
{
this.createdOn = value;
OnPropertyChanged("CreatedOn");
}
}
}
If it is not the exact requirement, please give us same more details about the exact scenario that you are trying to achieve. Thus, we would be able to assist you further.
I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Dess
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.