I tried this. But I am getting the following error when I call "ajaxRequest()" method.
"Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled"
Is it because ASP.NET MVC does not support postbacks (even async) as mentioned in here?
It seems like we cannot hook anything up to a server side event in MVC.
And in a seperate note I would like to say that the following works in the client side.
var scheduler = $find('<%= RadScheduler1.ClientID %>');
scheduler.get_timelineViewSettings().startTime = 3600000;
I can set startTime in clientside and the scheduler renders again when I call the following from clientside.
scheduler.set_selectedDate(date); //date is a valid date from seperate a datePicker
But I also need to set the "numberOfSlots"
property in radScheduler which Telerik client side api does not allow me to do. The following is the way I tried.
var sch = $find('<%= RadScheduler1.ClientID %>');
sch.get_timelineViewSettings().startTime = data.operatingHoursStart; //data is JSON return object
sch.get_timelineViewSettings().slotDuration = data.BlockDuration; //data is JSON return object
sch.get_timelineViewSettings().numberOfSlots = data.NoOfSlotsPerDay; // data is JSON return object.
// NoOfSlotsPerDay property has got a value like 8 (abosolute even number)
sch.set_selectedDate(date); //Render Scheduler again.
//date is a valid date from a seperate datePicker
The above changes start time and slot duration. But it does not change the number of slots
As an alternative when I set endTime
(in miliseconds) instead of numberOfSlots and call set_showFullTime(true)
Microsoft JScript runtime error: '0.rows' is null or not an object
Then I set ShowFullTime=True in design time (server property). It still shows only 3 slots (two time heading boxes) which is the default in radScheduler.
Please help me.
Thanks in advance