Hi Jose,
Thanks for contacting Syncfusion support.
We have prepared a sample for your requirement to filter the appointments in the schedule control based on specific profile (we are considering the profile as resource). We have four resources and when the check box is clicked, the appointments of those resources alone will be rendered on the scheduler. You can download the sample from the following location.
Default.aspx
|
<ej:Schedule ClientIDMode="Static" runat="server" ID="Schedule1" DataSourceID="objectDataSource1" Height="525px" CurrentDate="5/2/2014"
CurrentView="Day" Create="OnCreate" ShowAppointmentNavigator="false">
<Group Resources="Owners"/>
<Resources>
<ej:Resources Field="Owner" Name="Owners" Title="Owner" AllowMultiple="true">
<ResourceSettings Color="resColor" Id="resId" Text="resText">
</ResourceSettings>
</ej:Resources>
</Resources>
<AppointmentSettings Id="ID" Subject="Subject" AllDay="AllDay" StartTime="StartTime" EndTime="EndTime" Description="Description" Recurrence="Recurrence" RecurrenceRule="RecurrenceRule" ResourceFields="Owner"/>
</ej:Schedule>
</div>
<asp:ObjectDataSource ID="objectDataSource1" runat="server" TypeName="Sample.ScheduleAppointmentsObjDatum" SelectMethod="GetRecords">
</asp:ObjectDataSource> |
|
function changeClick(args) {
var schObj = $("#Schedule1").data("ejSchedule");
schObj.model.resources[0].resourceSettings.dataSource.push(args[0]);
var resVal = schObj.model.resources[0].resourceSettings.dataSource;
var dManager = ej.DataManager({
url: "/Default.aspx/GetData",
offline: false
});
dManager.adaptor = new ej.WebApiAdaptor();
$("#Schedule1").ejSchedule({
appointmentSettings:{dataSource:dManager},
resources: [{
field: "Owner",
title: "Owner",
name: "Owners", allowMultiple: false,
resourceSettings: {
dataSource: resVal,
text: "resText", id: "resId", color:"resColor"
}
}],
});
} |
Kindly try this solution or revert back to us with some more information, if we have misunderstood your requirement.
Regards,
Sabritha V