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

Resource grouping on Radscheduler.

16 Answers 229 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Soumya
Top achievements
Rank 1
Soumya asked on 27 Aug 2012, 05:55 AM
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

16 Answers, 1 is accepted

Sort by
0
Soumya
Top achievements
Rank 1
answered on 27 Aug 2012, 09:31 AM
Can I get it answered please?

Thanks,
Soumya
0
Soumya
Top achievements
Rank 1
answered on 28 Aug 2012, 05:08 AM
Any answer?
0
Ivana
Telerik team
answered on 28 Aug 2012, 03:31 PM
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.
0
Soumya
Top achievements
Rank 1
answered on 29 Aug 2012, 09:04 AM
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
0
Soumya
Top achievements
Rank 1
answered on 29 Aug 2012, 12:32 PM
Anyone knows,please let me know the answer.
Thanks,
Soumya
0
Soumya
Top achievements
Rank 1
answered on 30 Aug 2012, 02:43 PM
Telerik team,
could you please answer this?
0
Soumya
Top achievements
Rank 1
answered on 03 Sep 2012, 04:34 AM
Any answer?
Thanks,
Soumya
0
Ivana
Telerik team
answered on 03 Sep 2012, 08:46 AM
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.
0
Soumya
Top achievements
Rank 1
answered on 03 Sep 2012, 10:59 AM
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();         
       }

0
Soumya
Top achievements
Rank 1
answered on 04 Sep 2012, 12:43 PM
Any answer?
0
Soumya
Top achievements
Rank 1
answered on 05 Sep 2012, 04:28 AM
Still I am looking for an answer.
Telerik team ,
Could you please answer this?

Thanks,
Soumya
0
Ivana
Telerik team
answered on 05 Sep 2012, 11:43 AM
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.
0
Soumya
Top achievements
Rank 1
answered on 18 Sep 2012, 04:56 AM
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
0
Soumya
Top achievements
Rank 1
answered on 20 Sep 2012, 06:34 AM
Still waiting for the answer.
Does the mentioned scenario is not possible with Radscheduler?

Thanks,
Soumya.




0
Ivana
Telerik team
answered on 20 Sep 2012, 02:10 PM
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.
0
Soumya
Top achievements
Rank 1
answered on 22 Sep 2012, 10:17 AM
Thanks Ivana.
Tags
Scheduler
Asked by
Soumya
Top achievements
Rank 1
Answers by
Soumya
Top achievements
Rank 1
Ivana
Telerik team
Share this question
or