We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

show, hide the appointments of resources with CRUD

Thread ID:

Created:

Updated:

Platform:

Replies:

149549 Nov 29,2019 12:36 PM UTC Apr 27,2020 12:28 PM UTC ASP.NET Core - EJ 2 7
loading
Tags: Scheduler
theofilos
Asked On November 29, 2019 12:36 PM UTC

Hello,

I've been following the tutorial with the resources: https://ej2.syncfusion.com/aspnetcore/Schedule/Resource#/material .The appointments  show and hide with checkbox.
But when I changed to CRUD actions the appointments  doesn't hide  when you uncheck the resource . How can I do that with CRUD

This is the onChange of the checkboxes:
    function onChange() {
        var scheduleObj = document.getElementById('schedule').ej2_instances[0];
        var ownerOneObj = document.getElementById('emv').ej2_instances[0];
        var ownerTwoObj = document.getElementById('apo').ej2_instances[0];
        var ownerThreeObj = document.getElementById('pat').ej2_instances[0];
        var predicate;
        var checkBoxes = [ownerOneObj, ownerTwoObj, ownerThreeObj];
        checkBoxes.forEach(function (checkBoxObj) {
            if (checkBoxObj.checked) {
                if (predicate) {
                    predicate = predicate.or('CalendarId', 'equal', parseInt(checkBoxObj.value, 10));
                } else {
                    predicate = new ej.data.Predicate('CalendarId', 'equal', parseInt(checkBoxObj.value, 10));
                }
            }
        });
        scheduleObj.eventSettings.query = new ej.data.Query().where(predicate);
    }

I've also added the sample



Attachment: scheduler_with_database_c9cd93b9.rar

Vinitha Devi Murugan [Syncfusion]
Replied On December 3, 2019 12:26 PM UTC

Hi theofilos, 
 
Syncfusion Greetings. 
 
We have prepared the CRUD sample to show the appointments based on the check box selection and same can be available in below link. 
 
 
Kindly try with the above sample and let us know, if you need any further assistance on this. 
 
Regards, 
M.Vinitha devi 


theofilos
Replied On December 5, 2019 09:48 AM UTC

I tried to download and got Access Denied.



Hareesh Balasubramanian [Syncfusion]
Replied On December 6, 2019 11:34 AM UTC

Hi Theofilos, 

Sorry for the inconvenience caused. 

Kindly try the below link for download the sample, 

Regards, 
Hareesh 


theofilos
Replied On December 10, 2019 10:45 AM UTC

Hi,

I've tried the sample and it works great with 3 checkboxes.
But when I added more than 3 checkboxes it didn't work properly.
e.g. if I uncheck a property it doesn't hide the correct appointments.

You can check the sample. Thank you for your time

Attachment: JS2ScheduleSampleCRUDLOD_aed3bd3c.rar

Hareesh Balasubramanian [Syncfusion]
Replied On December 11, 2019 04:30 PM UTC

Hi Theofilos, 

Sorry for the inconvenience caused. 

Based on the requirement, we have modified your shared sample, which can be downloaded from the following link, 

Kindly try the above sample, if you have any concerns please revert us back for further assistance. 

Regards, 
Hareesh 


ransems
Replied On April 25, 2020 06:02 PM UTC

Any chance you can add the query as displayed in the literal ejs-schedule in the following:

I have:

@Html.EJS().Schedule("schedule").Width("100%").Height("685px").SelectedDate(DateTime.UtcNow).Timezone("UTC -04:00").Readonly(false).Resources(res =>
                                           {
                                               res.DataSource(ViewBag.Owners).Field("OwnerId").Title("OwnerSlug").Name("OwnerSlug").TextField("OwnerSlug").IdField("OwnerId").ColorField("Color").Add();
                                           }).EventSettings(es => es.DataSource(dataManger =>
                                           {
                                               dataManger.Url("/CrmAdmin/Resources/GetData").CrudUrl("/CrmAdmin/Resources/UpdateData").Adaptor("UrlAdaptor").CrossDomain(true);
                                           })).Render()



Hareesh Balasubramanian [Syncfusion]
Replied On April 27, 2020 12:28 PM UTC

Hi Ransems, 

Thanks for the update. 

We have ported the same CRUD sample in ASP.NET MVC platform and it can be downloaded from the following link, 


Kindly try the above sample and revert us if you have any further assistance. 

Regards, 
Hareesh 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon