Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
71 views
Hello,
I have expanded the "isSlotFree" function to work correctly when you use the 'Month' view in RadScheduler.  The way it's coded now only works for 'Day' or 'Week' view styles:

function

isSlotFree(targetSlot, appointment)

{

var startTime = targetSlot.get_startTime();

var scheduler = $find("<%= RadScheduler1.ClientID %>");

var currentView = scheduler.get_selectedView();

if(currentView==2)

// concatenate new startDate with appointments time portion if in MONTHLY view only

{

var originalStartTime = appointment.get_start();

var newHour = originalStartTime.getHours();

var newMinute = originalStartTime.getMinutes();

var newSecond = originalStartTime.getSeconds();

startTime.setHours(newHour);

startTime.setMinutes(newMinute);

startTime.setSeconds(newSecond);

var endTime = new Date(startTime.getTime() + appointment._getDuration());

}

else

{

var endTime = new Date(startTime.getTime() + appointment._getDuration());

}

return overlapsWithAnotherAppointment(appointment, startTime, endTime);

}

Simon
Telerik team
 answered on 23 Jun 2008
2 answers
172 views
I basically have this code:

private void Page_Load(object sender, EventArgs e) 
{ 
    if (!IsPostBack) 
    { 
        Session.Remove(AppointmentsKey); 
    } 
    scheduler.DataSource = Appointments; 
} 
 
private const string AppointmentsKey = 
                   "Telerik.Examples.Scheduler.BindToList_Apts"; 
private DataSet Appointments 
{ 
    get 
    { 
         
        DataSet sessApts = Session[AppointmentsKey] as DataSet; 
        if (sessApts == null) 
        { 
            sessApts = new DataSet(); 
            sessApts.ReadXml(Server.MapPath("appointments.xml")); 
            Session[AppointmentsKey] = sessApts; 
        } 
        return sessApts; 
    } 
} 
 
// For debug: 
protected void scheduler_AppointmentCommand(object sender, AppointmentCommandEventArgs e) 
{ 
    Response.Write("Command: " + e.CommandName); 
} 

Now, let's say that here is an appointment on June 20. If, while in monthly view, I double-click in a cell on or before June 20 to insert an appointment, everything works fine. But, if I click on a cell after June 20, when I click "more" all the appointments clear out of the calendar, the new appointment box stays there, and I have to click "more" a second time to get to the more detailed insert box. The first "more" click doesn't cause scheduler_AppointmentCommand to fire, but the second one does.


Simon
Telerik team
 answered on 23 Jun 2008
1 answer
169 views
Hello..

I am using the RadMenu inside of my Mater page.  I also have a datepicker inside of the same master page.  When I click the Calendar button, it appears, but the RadMenu cut thru the middle of it.  I have tried various parameters to fix this, but to no avail.  I am using IE 7.

Any help would be greatly appreciated.

Thank you,

Matthew

Peter
Telerik team
 answered on 23 Jun 2008
5 answers
249 views
Refer to my post here for one of my issues relating to the combobox (no I'm not using a stylesheet manager).

http://www.telerik.com/community/forums/thread/b311D-bekdke.aspx



Other issues that I've run into are:

The radiobuttons are not showing correctly.  They appear to have the bottom few pixels cut off.  This happens in both IE7 and in FireFox.  Here is the html being generated by the control:

ASPX:

<table cellpadding="0" cellspacing="2">  
    <tr> 
        <td> 
            Are operations in close proximity to protected area:&nbsp;  
        </td> 
        <td> 
            <asp:RadioButtonList ID="rblProtectedArea" runat="server" RepeatDirection="Horizontal" AutoPostBack="True" OnSelectedIndexChanged="rblProtectedArea_SelectedIndexChanged">  
                <asp:ListItem Text="Yes" Value="True" /> 
                <asp:ListItem Text="No" Value="False" /> 
            </asp:RadioButtonList> 
        </td> 
    </tr> 
</table> 

HTML:

<table id="ctl00_Content1_ctl00_rblProtectedArea" border="0">  
<tbody> 
<tr> 
<td> 
<input id="ctl00_Content1_ctl00_rblProtectedArea_0" class="Web20 input" type="radio" onclick="javascript:setTimeout('__doPostBack(\'ctl00$Content1$ctl00$rblProtectedArea$0\',\'\')', 0)" value="True" name="ctl00$Content1$ctl00$rblProtectedArea"/>  
<label class="Web20 radfdRadioUnchecked" for="ctl00_Content1_ctl00_rblProtectedArea_0">Yes</label> 
</td> 
<td> 
</td> 
</tr> 
</tbody> 
</table> 

Another issue I have that is only appearing in IE7 is I have 2 multi-line radtextbox controls on a page.  With the form decorator active it is actually making these 2 controls invisible.  I'm using the Web20 skin if that makes any difference.  It does not happen in FireFox.

ASPX:

Reasons for Initiatives (Regulatory Requirements / Voluntary):<br /> 
<Telerik:RadTextBox ID="txtInitiativesReasons" runat="server" SkinID="TextBoxDescription" /> 

THEME:

<Telerik:RadTextBox runat="server" SkinID="TextBoxDescription" 
    Skin="Web20" 
    TextMode="MultiLine" 
    Height="80px" 
    Width="700px" 
    Font-Size="10pt" 
    DisabledStyle-BorderColor="#c5cfe1" /> 

HTML:

<span id="ctl00_Content1_ctl00_txtInitiativesReasons_wrapper" class="radInput_Web20" style="white-space:nowrap;"><textarea rows="2" cols="20" id="ctl00_Content1_ctl00_txtInitiativesReasons_text" name="ctl00_Content1_ctl00_txtInitiativesReasons_text" class="radEnabledCss_Web20  inputCell" style="width:700px;height:80px;"></textarea><textarea id="ctl00_Content1_ctl00_txtInitiativesReasons" name="ctl00$Content1$ctl00$txtInitiativesReasons" style="visibility:hidden;margin:-18px 0 0 0;width:1px;height:1px;overflow:hidden;border:0;padding:0;" cols="20" rows="2"></textarea><input id="ctl00_Content1_ctl00_txtInitiativesReasons_ClientState" name="ctl00_Content1_ctl00_txtInitiativesReasons_ClientState" type="hidden" /></span> 


Thank you.

Andreas Kaech
Top achievements
Rank 1
 answered on 23 Jun 2008
7 answers
284 views
Hi!

I have some problems working with the RadDock with Prometheus. Here's an example of what I'm trying to do:

    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
    </telerik:RadScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> 
            <ajaxsettings> 
<telerik:AjaxSetting AjaxControlID="Button1"><updatedcontrols> 
<telerik:AjaxUpdatedControl ControlID="RadDock1"></telerik:AjaxUpdatedControl> 
<telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1"></telerik:AjaxUpdatedControl> 
</updatedcontrols> 
</telerik:AjaxSetting> 
</ajaxsettings> 
        </telerik:RadAjaxManager> 
         
         
        <telerik:RadDock ID="RadDock1" runat="server" Width="300px" Closed="True"  
            Height="300px" Title="Search"> 
        </telerik:RadDock> 
         
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" BorderWidth="1" runat="server" Height="100%" Width="100%"> 
            &nbsp;<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />     
             
        </telerik:RadAjaxPanel> 

The Button_Click action only does this : RadDock1.Closed = false;

What it does is it shows the RadDock object, but its not dragable and the action buttons (pin and close) arent working. Any ideas why? Any bypass?

Also, for this markup:
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
    </telerik:RadScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> 
            <ajaxsettings> 
<telerik:AjaxSetting AjaxControlID="Button1"><updatedcontrols> 
<telerik:AjaxUpdatedControl ControlID="RadDock1"></telerik:AjaxUpdatedControl> 
<telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1"></telerik:AjaxUpdatedControl> 
</updatedcontrols> 
</telerik:AjaxSetting> 
</ajaxsettings> 
        </telerik:RadAjaxManager>              
         
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" BorderWidth="1" runat="server" Height="100%" Width="100%"> 
            &nbsp;<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />     
                    <telerik:RadDock ID="RadDock1" runat="server" Width="300px" Closed="True"  
            Height="300px" Title="Search"> 
        </telerik:RadDock> 
        </telerik:RadAjaxPanel> 

Again with the same action on Button_Click (RadDock1.Closed = false), when i press the button once, nothing happens. When i press a 2nd time, heres the result:

Execution error Microsoft JScript: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'RadDock1Panel'. If it is being updated dynamically then it must be inside another UpdatePanel.

Any ideas why? Any bypass?

Thank you!
Petio Petkov
Telerik team
 answered on 23 Jun 2008
3 answers
217 views
Hi there,

I would like to be able to query if a dataItem or a row is in EditMode on the client-side in JavaScript on the RadGrid (using the Q1 2008 Ajax RadControls.)

I want to know this because I want to be able to set an item into EditMode if a user clicks on the row. At the moment I am solving this by putting the following code into the "ClientEvents-OnRowClick" event:

        var dataItem = $get(args.get_id());
        var anchorHref = dataItem.getElementsByTagName("a")[0].href;
  
        if (anchorHref.indexOf("EditButton") > 0)
            eval(anchorHref);


However, this seems like a real hack to me and is dependant on there being an Edit anchor element when not in editmode. Also I doubt this will work once I've "Ajaxified" my grid?

Thanks in advance,
 - Nick
Rosen
Telerik team
 answered on 23 Jun 2008
5 answers
241 views
Hi, im working with the RadDock with several areas/ windows,  after some dragging and dropping of the windows between the zones, i get the next error:

Invalid JSON primitive:

{"Top":0"Left":0,"DockZoneID":"ctl00_ContentPlaceHolder1_Display_RackDockZone1","Collapsed":false,"Pinned":false,"Closed":false,"index":2}


any idea of how to solve this problem???
Petio Petkov
Telerik team
 answered on 23 Jun 2008
6 answers
111 views
Is there a way to ensure Clientside, that nodes have to exist above or below a node before they may be dropped?

example:

node a
---node a.1
------node a.1.1
node b
---node b.1
node c
node d

node a.1.1 may be dropped onto any node below it, but node c may not be dropped on any node but node d.
Shaunus
Top achievements
Rank 1
 answered on 23 Jun 2008
1 answer
152 views
I have several editors on a page, some are dynamically added and removed from the page. I noticed that the new 615 version offers a new property called ToolProviderID for multiple editors to share the same toolbar. My page is getting really heavy with all these editors and would like to take advantage of this, but don't know how. I found this explanation of the property: http://www.telerik.com/help/aspnet-ajax/telerik.web.ui-telerik.web.ui.radeditor-toolproviderid.html. What I want to know though is what kind of control should I point this property to? I can't count on all my editors to be on the page all the time, so I can't use one for the master toolbar since it might not be there after a postback. Should I add an invisible editor to my page and point the ToolProviderID to it, or can I point it to something like <div runat=server id="shared_toolbar"></div>?
Tervel
Telerik team
 answered on 23 Jun 2008
1 answer
136 views
Hi,

When i use GetButtonByCommand method of toolbar it shows an alert box that says: "Cannot find a button with such command name!"

I know there is no buttons with such name, but my buttons are being loaded dynamically.

So i should use
if (GetButtonByCommand("cmdSome"))
    toolbar.DisableButton(GetButtonByCommand("cmdSome"));

So the GetButtonByCommand should return null if it can not find that button. And not alert anything i hope.

Kind Regards,
Caglar Ozkul
Atanas Korchev
Telerik team
 answered on 23 Jun 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?