This is a migrated thread and some comments may be shown as answers.

How to make a scheduler private for every single user

3 Answers 134 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Nikola
Top achievements
Rank 2
Nikola asked on 31 Jan 2013, 01:06 PM
How  can i create a scheduler or what do I need to add to my scheduler that every user can use the same scheduler but he  cannot see what the other one is inserting / updating / deleting 

can you give me some good advise or even a solution ? 

Thanks for fast answer and help 

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 31 Jan 2013, 01:22 PM
Hi Nikola,

 
One possible way to achieve such behavior is to add a particular custom attribute to each inserted appointment that will show the name of its "owner" and make the other appointments visible "false" if their user is not the one that is currently logged. Here is a sample code:

protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)
   {
       if (e.Appointment.Attributes["Name"]!="Peter")
       {
           e.Appointment.Visible = false;
       }
   }
 
   protected void RadScheduler1_AppointmentInsert(object sender, AppointmentInsertEventArgs e)
   {
       e.Appointment.Attributes.Add("Name", "Peter");
   }


Hope this will be helpful. 

Kind regards,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Nikola
Top achievements
Rank 2
answered on 31 Jan 2013, 01:30 PM
heey thanks for this fast and awesome answer i need to make it dynamical so that it dose not meter which user is creating a appointment 
is this possible to do with a id because its the easiest way you have maybe also a example for that ?     
0
Plamen
Telerik team
answered on 05 Feb 2013, 11:55 AM
Hello Nikola,

 
As far as I understood your requirements are to have their own appointments. The easiest way to achieve it is to assign a custom attribute to each one of them with a specific value -the user name of the currently logged person(in the sample code below it is hard coded to "Peter").

I am attaching my sample web page with RadScheduler bound to a "dummy" XML provider.

As for your question about the id-please elaborate a little bit  what are you trying to achieve with the ids because it is not quite clear from the explanation.

Hope this will be helpful.

All the best,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Scheduler
Asked by
Nikola
Top achievements
Rank 2
Answers by
Plamen
Telerik team
Nikola
Top achievements
Rank 2
Share this question
or