Resource grouping on Radscheduler.

17 posts, 0 answers
  1. Soumya
    Soumya avatar
    108 posts
    Member since:
    Jul 2012

    Posted 27 Aug 2012 Link to this post

    I am using 'external edit in raddock' for Radscheduler in my application.
    I have 2 checkboxes outside the scheduler,showing the resources Teacher and ClassRoom.
    When 1st checkbox is checked,scheduler is grouped by Teacher as below

    RadScheduler1.GroupBy = GroupByExpression;
    private string GroupByExpression
            {
                get
                {                              
                    return GroupByTeacherCheckBox.Checked ? "Teacher" : "";     
                     
                }
            }
    Same with checkbox for Room also.
    1)I have more than 30 Teachers.
    How can I display only say 5 Teachers at a time in the scheduler and need a horizontal scrollbar to show the rest of Teachers  
    ?
    2)When checkbox for Teacher(resource) is checked,I need to select a particular Teacher(resource value) from a combobox and show the appointments for that Teacher in the scheduler(day /week/month view).
    3)Also ,in the appointment template,how can I show any field from my advance form? For example,if my advance form has field mobile number,can I show it in the appointment template?

    Please help me on above questions
    Thanks,
    Soumya
  2. Soumya
    Soumya avatar
    108 posts
    Member since:
    Jul 2012

    Posted 27 Aug 2012 Link to this post

    Can I get it answered please?

    Thanks,
    Soumya
  3. Soumya
    Soumya avatar
    108 posts
    Member since:
    Jul 2012

    Posted 28 Aug 2012 Link to this post

    Any answer?
  4. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 28 Aug 2012 Link to this post

    Hi Soumya,

    The following resources on manipulating RadScheduler's resources could be of help:

    As for managing appointment templates, the following online demo shows how to achieve it: http://demos.telerik.com/aspnet-ajax/scheduler/examples/customizeappointment/defaultcs.aspx.

    I hope this will help.

    Regards,
    Ivana
    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.
  5. Soumya
    Soumya avatar
    108 posts
    Member since:
    Jul 2012

    Posted 29 Aug 2012 Link to this post

    Hi Ivana,
    Thanks for your reply.
    I got answered my first and third question.

    My second question is as below:
    2)When checkbox for Teacher(resource) is checked,I need to select a particular Teacher(resource value) from a combobox and show the appointments for that Teacher in the scheduler(day /week/month view). 

    I have a checkbox for the resource 'Teacher'.When this check box is checked,a multicolumn combobox (which is also outside the scheduler,next to check box) is enabled.From this combobox,user can select a particular teacher.

    I need to show the data for that particular teacher,say teacher1 in the scheduler.
    How can I do it in the code behind on combobox SelectedIndexChanged event as below?

     protected void RCTeacher_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
            {
                RadScheduler1.GroupBy = RCTeacher .Text;  --->This does not work.
                RadScheduler1.Rebind();
            }

    Thanks,
    Soumya
  6. Soumya
    Soumya avatar
    108 posts
    Member since:
    Jul 2012

    Posted 29 Aug 2012 Link to this post

    Anyone knows,please let me know the answer.
    Thanks,
    Soumya
  7. Soumya
    Soumya avatar
    108 posts
    Member since:
    Jul 2012

    Posted 30 Aug 2012 Link to this post

    Telerik team,
    could you please answer this?
  8. Soumya
    Soumya avatar
    108 posts
    Member since:
    Jul 2012

    Posted 02 Sep 2012 Link to this post

    Any answer?
    Thanks,
    Soumya
  9. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 03 Sep 2012 Link to this post

    Hi Soumya,

    The following example shows how to filter the appointments by their resources: http://demos.telerik.com/aspnet-ajax/scheduler/examples/resources/defaultcs.aspx.

    As for your scenario, you could define a CheckBox on your page which enables/disables the RadComboBox control which represents the teachers.
    <asp:CheckBox runat="server" ID="CheckBox1" Text="enable/disable" OnCheckedChanged="CheckBox1_CheckedChanged" AutoPostBack="true"/>
    <telerik:RadComboBox runat="server" ID="RadComboBox1" DataSourceID="SqlDataSourceUser"
        DataTextField="UserName" DataValueField="ID" OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged" />
    protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
    {
        if (CheckBox1.Checked)
            RadComboBox1.Enabled = true;
        else
            RadComboBox1.Enabled = false;
    }

    Then, when the selected index of the teachers RadComboBox  is changed you could filter the appointments by the resource which is currently selected in the RadComboBox (refer to the AppointmnetDataBound event handler on the server in the aforementioned demo).

    I hope this will help.

    Regards,
    Ivana
    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.
  10. Soumya
    Soumya avatar
    108 posts
    Member since:
    Jul 2012

    Posted 03 Sep 2012 Link to this post

    Hi Ivana,
    Thanks for the reply.
    As you have mentioned I have a check box.On checked change event of the checkbox,the combobox is enabled/disabled.
    I tried like this in my scenario on combobox selected index changed event,inorder to group scheduler for a particular teacher.
    Combobox here I use is multicolumn combobox with teacher and subject as text and teacher id as value.Hence RCTeacher.SelectedValue.Split(new char[] { ':' })[0]  gives teacher ID.I have also  tried by RCTeacher.text which is the teacher name.But the scheduler is not getting  grouped and no appointments are shown.

    In the demo you have given,in the AppointmentDataboundEvent,the appointment is made visible/invisible.So I think I need not implement that in the appointmentdatabound event.
    How should be the group by expression in the RCTeacher_SelectedIndexChanged  event ? Please correct me if my understanding is wrong.

    protected void RCTeacher_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
           {
               RadScheduler1.GroupBy = RCTeacher.SelectedValue.Split(new char[] { ':' })[0];
               RadScheduler1.Rebind();         
           }

  11. Soumya
    Soumya avatar
    108 posts
    Member since:
    Jul 2012

    Posted 04 Sep 2012 Link to this post

    Any answer?
  12. Soumya
    Soumya avatar
    108 posts
    Member since:
    Jul 2012

    Posted 04 Sep 2012 Link to this post

    Still I am looking for an answer.
    Telerik team ,
    Could you please answer this?

    Thanks,
    Soumya
  13. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 05 Sep 2012 Link to this post

    Hello Soumya,

    You can not group by some string, but you need to do the grouping by a resource. The following demo shows grouping by resources and date: http://demos.telerik.com/aspnet-ajax/scheduler/examples/resourcegrouping/defaultcs.aspx.

    Could you please open a support ticket on the matter where you can send us a runnable sample project of your scenario? This way we will be able to take a look at it locally and provide a more accurate answer to your queries.

    Thank you!

    Regards,
    Ivana
    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.
  14. Soumya
    Soumya avatar
    108 posts
    Member since:
    Jul 2012

    Posted 17 Sep 2012 Link to this post

    Hi Ivana,

    In the demo you have given,scheduler is grouped by Room.In my scenario , I have this check box for Room and a combobox showing all Rooms (Room1,Room2,Room3 etc).
    When the check box for Room is checked,combobox gets enabled.Now if I select a particular room from combobox ,say Room1,how can I show the scheduler with appointments in Room1 only ?

    Hope this is clear now.

    Thanks,
    Soumya
  15. Soumya
    Soumya avatar
    108 posts
    Member since:
    Jul 2012

    Posted 20 Sep 2012 Link to this post

    Still waiting for the answer.
    Does the mentioned scenario is not possible with Radscheduler?

    Thanks,
    Soumya.




  16. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 20 Sep 2012 Link to this post

    Hi Soumya,

    You can subscribe to the AppointmentDataBound server event of RadScheduler. Here you can check for the appointment's resource -- if it does not match the currently selected item in RadComboBox you can set its visibility to 'false'.

    Kind regards,
    Ivana
    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.
  17. Soumya
    Soumya avatar
    108 posts
    Member since:
    Jul 2012

    Posted 22 Sep 2012 Link to this post

    Thanks Ivana.
Back to Top