I am using an Ajax-enabled RadCalendar. The calendar is using SpecialDays to identify event dates on the calendar, and I am dynamically assigning the special days based on values I pull from my database when the control loads. All of this works as expected, and I see the desired css-decoration of the event dates. However, I also give my user the option of changing his location via a drop-down. When the user chooses a new location, the SelectedIndexChanged event is fired, and the database is re-queried for a new list of event dates.
I am trying to use this new list of event dates to re-build the SpecialDays list. And, in fact, I am able to clear the current SpecialDays list, and populate it with the new dates. However, I can’t get the new SpecialDays to display without refreshing the entire page. How do I code this control so that the new SpecialDays list will display without doing a refresh?
I am new to posting in your forums, so I am not sure what additional information you may need. Let me know if you need any additional information.
Thanks in advance!
function DateSelectedFirstPref(sender, args) {
if (!isTimeSelected) {
var val = "08:00:00";
var dateString = sender._dateInput._initialValue;
var month = dateString.split("/")[0];
var day = dateString.split("/")[1];
var yearTime = dateString.split("/")[2];
var year = yearTime.split(" ")[0];
sender.set_selectedDate(new Date(year, month, day, val.split(":")[0], val.split(":")[1], val.split(":")[2], 0));
}
}
The findControl method is not able to find controls when called inside of the event handler for the OnGridCreated event as follows. This will cause an error because findControl() returns null. Shouldn't the controls be loaded at this point? Note that I am able to find controls in the row selected/deselected event handlers.
function gridCreated(sender, args)
{
for (var i = 0; i <= sender.get_selectedItems().length - 1; i++)
{
sender.get_selectedItems()[i].findControl("rntbMinDistance").enable();
}
}