- Home
- Forum
- ASP.NET MVC - EJ 2
- why my load data method call twice when chnage scheduler view
why my load data method call twice when chnage scheduler view
why my LoadData action call twice when i change the scheduler day view to week or day to month view.
if i change date or resource of scheduler then also loaddata call twice
when my onchagneresource function call then loaddata call twice
function onchagneresource()
{
$.ajax({
type: "POST",
data: param,
url: '@Url.Action("GetResourcesByLoc", "Home")',
async:false,
success: function (data) {
datapro = data.schproviders;
debugger
let scheduleObj1 = document.querySelector('#mainSchedule').ej2_instances[0];
scheduleObj1.resources[1].dataSource = datapro;
scheduleObj1.dataBound;
}
});}
public JsonResult LoadData(Params param) // Here we get the Start and End Date and based on that can filter the data and return to Scheduler
{
string loc = param.Location;
string res = param.ResourceId;
DateTime start = param.StartDate;
DateTime end = param.EndDate;
var data = new SchedulerData().GetAppointments(start, end, loc, res);
var jsonResult = Json(data, JsonRequestBehavior.AllowGet);
jsonResult.MaxJsonLength = int.MaxValue;
return jsonResult;
}
SIGN IN To post a reply.
3 Replies
SK
Satheesh Kumar Balasubramanian
Syncfusion Team
May 13, 2021 01:50 PM UTC
Hi Nishit,
Thanks for using Syncfusion Products.
We have validated your reported query "why my load data method call twice when change scheduler view" and prepared sample to reproduce the reported issue at our end. But, we were unable to reproduce the issue in our end.
Please find the sample which prepared for your issue - https://www.syncfusion.com/downloads/support/forum/165399/ze/LoadDataCallingTwice126119230
Could you please share the below details to reproduce the issue? This will help to validate the issue and provide prompt solution as soon as possible.
- Share the above sample with modifying code to replicate the issue
- Share all schedule related code snippets.
- Share issue replicating sample if possible
- Share Syncfusion.EJ2.JavaScript.dll, Syncfusion.EJ2.MVC5.dll and ej2.min.js version of your application.
- Share issue depicting image(or)video.
Regards,
Satheesh Kumar B
VP
Vipul Patel
May 14, 2021 07:06 AM UTC
when I change scheduler view to week,workview and month then LoadData call twice . even I change resource or location from dropdwon then Load data call twice
Attachment: Index_31da1a51.rar
Kindly find the attached code
Attachment: Index_31da1a51.rar
SK
Satheesh Kumar Balasubramanian
Syncfusion Team
May 17, 2021 03:57 PM UTC
Hi SMD_DigiDev1,
Thanks for your update.
We have validated your reported query and modified the sample to reproduce the reported issue with your shared code snippets. But, we were unable to reproduce the issue at our end.
Please find the modified sample for your issue - https://www.syncfusion.com/downloads/support/forum/165399/ze/LoadDataCallingTwice-247168529
Could you please share the below details to reproduce the issue? This will help to validate the issue and provide prompt solution as soon as possible.
- Share the above sample with modifying code to replicate the issue
- Share issue replicating sample if possible
- Share all schedule controller related code snippets with Syncfusion.EJ2.Javascript.dll and Syncfusion.EJ2.MVC5.dll version of your application
Regards,
Satheesh Kumar B
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
NH Nishit Hirpara
- May 12, 2021 08:53 AM UTC
- May 17, 2021 03:57 PM UTC