How to make a scheduler private for every single user

4 posts, 0 answers
  1. Nikola
    Nikola avatar
    65 posts
    Member since:
    Sep 2012

    Posted 31 Jan 2013 Link to this post

    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 
  2. Plamen
    Admin
    Plamen avatar
    3079 posts

    Posted 31 Jan 2013 Link to this post

    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.
  3. Nikola
    Nikola avatar
    65 posts
    Member since:
    Sep 2012

    Posted 31 Jan 2013 Link to this post

    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 ?     
  4. Plamen
    Admin
    Plamen avatar
    3079 posts

    Posted 05 Feb 2013 Link to this post

    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.
Back to Top