Telerik Forums
UI for ASP.NET AJAX Forum
11 answers
156 views
Hi,
I am using OnClientAppointmentMoveEnd to determine if the user is trying to move an appointment to a disabled timeslot:

function onAppointmentMoveEnd(sender, args) {
    var start = args.get_targetSlot().get_startTime();
    var end = new Date(start.getTime() + args.get_appointment().get_duration());
 
    var slotElement = $telerik.$(args.get_targetSlot().get_domElement());
    if (slotElement.is(".Disabled") || slotElement.parent().is(".Disabled")) {
        // Prevent appointment move to disabled timeslots.
        alert("This venue is not available in this time period.");
        args.set_cancel(true);
    }
         
    warnIfOccupied(start, end, sender, args);
}

It runs without an error but it also skips over the conditional statement when it shouldn't.

I can verify that this works when I use it on the event OnClientAppointmentResizeEnd. This code works correctly and stops the user dragging the appointment into a disabled area:

function onAppointmentResizeEnd(sender, args) {
    var start = args.get_appointment().get_start();
    var end = args.get_targetSlot().get_endTime();
 
    warnIfOccupied(start, end, sender, args);
 
    var slotElement = $telerik.$(args.get_targetSlot().get_domElement());
    if (slotElement.is(".Disabled") || slotElement.parent().is(".Disabled")) {
        // Prevent appointment move to disabled timeslots.
        alert("This venue is not available in this time period.");
        args.set_cancel(true);
    }
}

It seems that the (slotElement.is(".Disabled") || slotElement.parent().is(".Disabled")) is not available to the OnClientAppointmentMoveEnd event.

Please advise if I am simply "doing it wrong" or, if this is in fact, a bug.

Thanks.
Kevin Kembel
Top achievements
Rank 1
 answered on 24 May 2011
2 answers
98 views
Hi

I have a little problem. I have a grid and I want to show a context menu when I click inside the grid, but if I click on a row of the grid, I want to show the context menu A and if I click in the grid, but not on a row, I want to show the context menu B. For doing that, I tried to make a context menu for when I click on a row and I created another context menu who target the entire grid. So, it okay when I don't click on a row, but when I do, two context menu appears and it's the wrong that stay. May someone help me with this ? Thanks.
David
Top achievements
Rank 1
 answered on 24 May 2011
5 answers
203 views
Hi,

I'm using a grid and I followed this demo to make a context menu wich allow to add, edit or delete a user. The problem is that I want that a confirm window appears when I click on the delete item. So, I used a WindowManger.RadConfirm(), wich call a JS function. There, I verified if the paramater is true or false. If true, so it mean the user click on okay and then, with a ajaxRequest, I call a function in the code-behind who delete the user. Everything will be just find, if it wasn't for just one thing : the grid isn't automatically update and the user stay in the list even after it is delete. I had to close my window and open it again to show my grid with the correct data. I tried to do a dataRebind, but it doesn't work. Can someone tell me what to do to refresh my grid. Thanks !!!    

David
David
Top achievements
Rank 1
 answered on 24 May 2011
5 answers
160 views
Hi,

I open  a traditional child window via javascript but I can't return data to my radeditor. I can successfully return to a textbox, but can't to the radeditor. I'm using window.opener.  


I am using master pages as well.

Thanks,


Mike
Rumen
Telerik team
 answered on 24 May 2011
5 answers
206 views
Hello!

I'm using the ViewState, I added paging to Radgrid. When I change page, ViewState is lost. What I can do to avoid this incident happen?

Greetings
Carlos Rodríguez
Carlos Rodriguez
Top achievements
Rank 1
 answered on 24 May 2011
1 answer
186 views
i made this post in the asp.net forum and that might have been the wrong place so i'm adding it here too....

I'm trying to enable drag and drop from RadTreeView to RadEditor following the demo, but i also need to be able to insert text in HTML view. When i call $telerik.getBounds() on the return of editor.get_textArea(), the .x and .y are incorrect, something like 0,1. I am checking prior to this that they are indeed in html mode. This works fine for the alternative in design view and get_contentAreaElement(). Is there a way to get the bounds of the textArea, or just the entire control when in HTML view? ( i dont care if they are over the text box or the entire radEditor).

version 2011 q1 sp2
visual studio 2010 premium/c#
IE9 in standard and compatibility mode, IE8, firefox all do the same thing

function isMouseOverEditorCodeView(editor, events) {  
var textFrame= editor.get_textArea(); 
var textRect= $telerik.getBounds(textFrame); 
var mouseX = events.clientX;
var mouseY = events.clientY; 
if (mouseX < (textRect.x + textRect.width) && mouseX > textRect.x &&  
    mouseY < (textRect.y + xtRect.height) && mouseY > textRect.y) {  
return true;  
return false;  
}
Rumen
Telerik team
 answered on 24 May 2011
5 answers
264 views
Is there a way I can catch hold of the next 10 upcoming events for a user and display them in a listbox? The Recurrence rule poses a major roadblock here. Any light on this will be appreciated.

Sanjeev
Peter
Telerik team
 answered on 24 May 2011
4 answers
264 views
Hi I have a RadGrid

On the Grid ItemDatabound event i am adding a tooltip dependant of the Cell content, I call a seperate method that builds a string and assigns it as the tooltip.  All is working well but on one of the Tooltips the text is truncated, is there a max length setting on the tooltip ? If So is there a workaround to construct a longer string.

Im using a string builder to construct the string which is 743 characters. The tooltip seems to truncate anything after 512 characters

Any ideas ?

Thanks


Gimmik
Top achievements
Rank 1
 answered on 24 May 2011
4 answers
122 views

Hey.

I am using RadSheduler and it's  AppointmentTemplate.

In my ObjectDataSource for RadSheduler i have Tour objects, each of them include list of Drivers oneself (one tour may have many drivers).

like this:

Class Tour{                                    Class Driver{ 
   int ID,                                       int ID,
   Datetime StartDate,                           string Name,
   Datetime Enddate,                             Datetime Start, 
   List<Driver> Drivers                          Datetime End 
}                                              }

So, my sheduler datasource is list of tours.

Now i want to achieve these:

   1.) show the list of drivers in my AppointmentTemplate for each tour (main goal) - what is the best way to do this?

   2.) each driver has start and end dates (start represents the date when the driver started or joined the tour), they are alway between the tour's StartDate and EndDate. So, i'd like the driver name to appear under the date when he joined the tour. For instance - if tour StartDate is May 2, and driver1 started the tour, and driver2 joined on May 4 AppointmentTemp to look like something as in attached file. Is that possible anyway?

thanks.

Peter
Telerik team
 answered on 24 May 2011
3 answers
123 views
We have a license for the ASP.Net Ajax editor, but before I start messing around with it, can someone tell me if it even works in an MVC/Razor web project?

Thanks
Rumen
Telerik team
 answered on 24 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?