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

Validation in scheduler

1 Answer 89 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Chinnu Prabhakar
Top achievements
Rank 1
Chinnu Prabhakar asked on 23 Oct 2009, 08:45 AM
Hi friends

I want to validate the below control, how to do that.


and also this one, if we dont select any event , some msg shld come like "Please select an event" , but without choosing the event its is saving, inorder to bind i use the usercontrol AdvancedForm, the radcombox  is placed in resourcecontrol usercontrol , i used the
emptyMessage option in radcombobox but nothing is displaying and not validating

Please help

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 27 Oct 2009, 11:47 AM
Hello Chinnu,

Using the demo from this kb article (SchedulerCustomAdvancedFormQ2_SP1_2009.zip), suppose you want to validate if a room is selected. To do this, add the following code in the FormCreated handler of RadScheduler:

  var schedulerTemplates = {};
  
            function schedulerFormCreated(scheduler, eventArgs) {
              
            var RoomRadComboBoxID = null;
            $telerik.$(".rsAdvResourceValue").each(function(i) {
                if (this.id.match("Room") != null)
                    RoomRadComboBoxID = this.id;
            });
            if (RoomRadComboBoxID != null) {
                var RoomRadComboBox = $find(RoomRadComboBoxID);
                $telerik.$(".rsAdvEditSave").bind("click", function(e) {
                    var RoomRadComboBox = $find(RoomRadComboBoxID);
                    if (RoomRadComboBox.get_selectedItem().get_text() == "-") {
                        alert("Please select a room!");
                        return false;
                    }
                });            
            }
  
* * *

I hope this helps.


Greetings,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Scheduler
Asked by
Chinnu Prabhakar
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or