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

Make a resource required?

5 Answers 57 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Rick
Top achievements
Rank 1
Rick asked on 07 Jan 2011, 05:02 PM
I have three resources added and when someone creates and saves an appointment I want the resource to be required, is there and easy way to do this? Is this functionality built in?

5 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 10 Jan 2011, 03:03 PM
Hi mystrymaster,

To be able to make the resource required you can remove the default "-" item in the RadCombobox so that each time an item will be selected. Here's the code for this:

protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e)
   {
       if ((e.Container.Mode == SchedulerFormMode.AdvancedEdit)||(e.Container.Mode == SchedulerFormMode.AdvancedInsert))
       {
           RadComboBox roomsCombo = e.Container.FindControl("ResRoom") as RadComboBox;
           roomsCombo.Items[0].Remove();
       }
   }

Please note that in the above code, 'Room' is the resource type name, but we need the 'res' prefix also to find the combobox control.

Feel free to ask me if you have further questions.

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
Rick
Top achievements
Rank 1
answered on 10 Jan 2011, 03:12 PM
That doesn't make it required though, that just default selects something for them.

There is no way to make it required?
0
Veronica
Telerik team
answered on 13 Jan 2011, 02:08 PM
Hello mystrymaster,

To make the resource required with appropriate error message you need RequiredFieldValidator. To add validators in the AdvancedForm you'll need to customize the AdvancedForm.

Please take a look at the attached sample project in the .zip file for an example.

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
IT
Top achievements
Rank 1
answered on 16 Feb 2021, 04:23 PM
This doesn't show how to add a required field validator to a resource.
0
Peter Milchev
Telerik team
answered on 16 Feb 2021, 04:24 PM

Hi,

Please check the following Code Library project for a runnable solution with required resources:

Regards,
Peter Milchev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Scheduler
Asked by
Rick
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Rick
Top achievements
Rank 1
IT
Top achievements
Rank 1
Peter Milchev
Telerik team
Share this question
or