I am using a MVC Project using RadScheduler. My problems begins with the multi-valued resources. I use MultipleResourceValue parameter, but, in the advanced editing form, my resource appears as a DropDownList.
How can I change the DropDwonList for a CheckBoxList?
Thanks
How can I change the DropDwonList for a CheckBoxList?
Thanks
5 Answers, 1 is accepted
0
Hi Rafael,
In order to display multi-valued resources in the Advanced Form as a checkboxlist - you need to set the AllowMultipleValues property of the resources to "True" in the RadScheduler's DataBound event handler as shown in this demo:
Please let me know if this was helpful.
Kind regards,
Veronica Milcheva
the Telerik team
In order to display multi-valued resources in the Advanced Form as a checkboxlist - you need to set the AllowMultipleValues property of the resources to "True" in the RadScheduler's DataBound event handler as shown in this demo:
protected
void
RadScheduler1_DataBound(
object
sender, EventArgs e)
{
RadScheduler1.ResourceTypes.FindByName(
"User"
).AllowMultipleValues =
true
;
//RadScheduler1.ResourceTypes.FindByName("Room").AllowMultipleValues = false;
}
Please let me know if this was helpful.
Kind regards,
Veronica Milcheva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0

Rafael
Top achievements
Rank 1
answered on 26 Apr 2011, 09:19 AM
Can I do this without code behind? I use a custom provider and I initialize the AllowMultipleValues to true in GetResource and GetResourceTypes methods . I remember that my proyect is MVC. I use that like in this example: http://www.telerik.com/help/aspnet-ajax/schedule_databindingimplementingaproviderthatsupportsmultivaluedresources.html
Thanks in advance :)
Thanks in advance :)
0
Hello Rafael,
As you are using a provider to bind the RadScheduler please make sure that you have set the second parameter of the ResourceType constructor to "true" so that you indicate that the resource will be multi-valued:
If this still doesn't helps could you please send me your project so I can inspect it and help you?
Thank you!
Best Regards,
Veronica Milcheva
the Telerik team
As you are using a provider to bind the RadScheduler please make sure that you have set the second parameter of the ResourceType constructor to "true" so that you indicate that the resource will be multi-valued:
public
override
IEnumerable<ResourceType> GetResourceTypes(RadScheduler owner)
{
ResourceType[] resourceTypes =
new
ResourceType[2];
resourceTypes[0] =
new
ResourceType(
"Teacher"
,
false
);
resourceTypes[1] =
new
ResourceType(
"Student"
,
true
);
return
resourceTypes;
}
If this still doesn't helps could you please send me your project so I can inspect it and help you?
Thank you!
Best Regards,
Veronica Milcheva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0

Rafael
Top achievements
Rank 1
answered on 26 Apr 2011, 01:01 PM
Hello, I uploaded a simple proyect with my problem at http://dl.dropbox.com/u/362745/MultiValueTest.rar , I use a trial Telerik DLL in this example.
Thanks in advance :)
Thanks in advance :)
0
Hello Rafael,
Thank you for the attached project.
It seems that we are having problems with setting the AllowMultipleValues property in the GetResources() method in Providers. We need to investigate this further.
For now as a workaround you can subscribe to the OnDataBound event of the RadScheduler and set the resources to be multi-valued in the handler:
I am sending you the edited project back.
Hope this helps.
Regards,
Veronica Milcheva
the Telerik team
Thank you for the attached project.
It seems that we are having problems with setting the AllowMultipleValues property in the GetResources() method in Providers. We need to investigate this further.
For now as a workaround you can subscribe to the OnDataBound event of the RadScheduler and set the resources to be multi-valued in the handler:
<
asp:Content
ID
=
"Content2"
ContentPlaceHolderID
=
"MainContent"
runat
=
"server"
>
<
script
runat
=
"server"
>
protected void RadScheduler1_DataBound(object sender, EventArgs e)
{
RadScheduler1.ResourceTypes.FindByName("Student").AllowMultipleValues = true;
}
</
script
>
<
telerik:RadScheduler
runat
=
"server"
ID
=
"RadScheduler1"
WebServiceSettings-Path
=
"~/Services/AppointmentService.asmx"
WebServiceSettings-ResourcePopulationMode
=
"ServerSide"
FirstDayOfWeek
=
"Monday"
OnDataBound
=
"RadScheduler1_DataBound"
LastDayOfWeek
=
"Sunday"
Skin
=
"Forest"
StartInsertingInAdvancedForm
=
"true"
StartEditingInAdvancedForm
=
"true"
EnableDescriptionField
=
"true"
MultiDayView-UserSelectable
=
"true"
ShowResourceHeaders
=
"true"
EnableAdvancedForm
=
"true"
>
</
telerik:RadScheduler
>
</
asp:Content
>
I am sending you the edited project back.
Hope this helps.
Regards,
Veronica Milcheva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.