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

get the name of the resource in clientside event

3 Answers 42 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Indranik
Top achievements
Rank 1
Indranik asked on 06 Jan 2009, 10:47 AM
Hi,
    How can i get the name of the resource for which the timeslot has been clicked in the OnClientAppointmentInserting event.

My code looks like this:

function

OnClientAppointmentInserting(sender, eventArgs)

 

{

    eventArgs.set_cancel(

true);

 

 

    var x=eventArgs.get_resource(); // not working i need a suitable function here.

 

 

    if(eventArgs.get_startTime().getHours() < 8)

 

    {

        alert(

"non-business hour");

 

    }

 

    else

 

    {
        window.location.href =

"NewBooking.aspx";

 

    }

 

}


i want to store the id of the resource in x and send it through querystring.

3 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 08 Jan 2009, 06:03 PM
Hello Indranik,

Please use eventArgs.get_targetSlot().get_resource().get_text();.

Kind regards,
Simon
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Indranik
Top achievements
Rank 1
answered on 09 Jan 2009, 05:09 AM
Hi,
    Thanks for the reply. How do I get the id of the resource in the javascript?
0
Atanas Korchev
Telerik team
answered on 09 Jan 2009, 03:11 PM
Hi Indranik,

Please check this help topic.

Sincerely yours,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Scheduler
Asked by
Indranik
Top achievements
Rank 1
Answers by
Simon
Telerik team
Indranik
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or