Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
126 views
Dear All,

I found the example http://demos.telerik.com/aspnet-ajax/tabstrip/examples/applicationscenarios/loadondemand/defaultcs.aspx very useful as start.

I have a slightly differences in the implementation approach, which is : my tab that will load other user controls on demand is itself in a usercontrol that loads dynamically.

I don't know why the if (!Page.IsPostBack) is always "false", it never fires !! unless I take out the "!".

Is it correct that the whole pages will be loaded every time the control is loaded !!
which is against the approach (load on demand)

How I can resolve this ...

Best regards
Waleed
Waleed Seada
Top achievements
Rank 2
 answered on 23 Dec 2009
1 answer
118 views
Hello,

Using the RadControl helper to create a date picker.  I'm also using script to do this:

var comp = $find("<%= StartDate.ClientID %>");

Similar to what you would do in ASP.NET web forms.  But I get an error.  So I took it out and inspected the markup, and I couldn't find a StartDate element, so I don't know if that is also contributing to the error.

Any ideas for handling this?

Thanks.
Georgi Krustev
Telerik team
 answered on 23 Dec 2009
1 answer
194 views
Hi,
Im trying to use telerik controls with ASP.Net MVC 2 RC.  Im trying to use the MVC dataannotations server/client validations on the form which has some telerik controls placed inside.  My problem is that MVC client validation stops working when I try to use the RADScriptManager with a html form tag. It seems like the MVC EnableClientValidation only works with use Html.BeginForm method because it wires up some flags in the background when its rendering the form tag.

When I place the RADScriptManager inside the Html.BeginForm and I get the RADScriptManager requires a form runat="server" error.
If i add a html form tag e.g <form id="frm" runat="server"> on the page and add scriptmanager then the Html.EnableClientValidation is not triggered.  Is there a way to make this work?
<%@ Page Language="C#" Inherits="ViewPage<ProductViewModel>" %>

<% Html.EnableClientValidation(); %>
<% using (Html.BeginForm()) { %>

  <%= Html.TextBoxFor(m => m.Title) %>
    <%= Html.ValidationMessageFor(m => m.Title) %>
  <%= Html.TextBoxFor(m => m.Price) %>
    <%= Html.ValidationMessageFor(m => m.Price) %>

    <input type="submit" />
<% } %>
Georgi Krustev
Telerik team
 answered on 23 Dec 2009
0 answers
152 views
Hi,

In radgrid. i have a edit item template, while editing these items i need some required fields and i need to display the error message in ValidatorCalloutExtender of Ajax tool kit.
it is working perfectly. For sake of this single functionality (callout extender) i am attaching AjaxToolKit, its bit heavy for this single use. Is there any other source in Telerik to implement the same callout feel without including AjaxToolKit.

                                <EditItemTemplate> 
                                    <asp:TextBox runat="server" ID="tbShortDescription" Text='<%# Bind("SD_txt") %>' 
                                        MaxLength="30" TabIndex="4"></asp:TextBox> 
                                    <span style="color: Red">*</span> 
                                    <asp:RequiredFieldValidator ID="rfvSD" ControlToValidate="tbShortDescription" ErrorMessage="The short description can not be blank" 
                                        runat="server" Display="None">  
                                    </asp:RequiredFieldValidator> 
                                    <ajax:ValidatorCalloutExtender runat="Server" ID="vceSD" TargetControlID="rfvSD" 
                                        Width="250px" HighlightCssClass="highlight" CloseImageUrl="../Images/close.gif" /> 
                                </EditItemTemplate> 
thanks in advance,
Bharani
Bharani
Top achievements
Rank 1
 asked on 23 Dec 2009
1 answer
237 views
Hi,

I have two custom skins, which have been added to a custom assembly and then referenced in the Style Sheet Manager. I can switch my application (a MOSS Web Part) between the two styles and the normal  Rad Controls show the appropriate skinning. However the Form Decorator always decorates it's controls using the skin that was registered last.

To be on the safe side I have had my code reviewed and no obvious errors have been spotted.

Has anyone had/seen this issue before, or have any suggestions on how to resolve it?

Thanks

Andrew
Martin
Telerik team
 answered on 23 Dec 2009
6 answers
146 views
What is your stated level of support for Firefox 2.x? Your control suite all works great in it, with the huge exception of the Toolbar control. This isn't new to Q3 2009, it's been an issue for several releases. The Toolbar is completely broken in many ways on Fx2, and although I was able to doctor up the CSS in previous releases to make it work, with Q3 2009 SP1 I am so far unable to get it fully working in Fx2. I'm concerned that Telerik is no longer supporting Fx2, and that I will have to end-of-life the browser with my clients, many of which are still using it.
Kamen Bundev
Telerik team
 answered on 23 Dec 2009
1 answer
196 views
Hi,

I am having requirement, Rad Grid with 2 levels of heirarchy. Parent Grid is having "Google like Filters" and "Pagination".
Based on some condition I am displaying(Show/Hide) the "Expand" symbol. 
Once I click on "Expand" symbol, I get data from DB and load the Child Grid.

I want to expand the Child Grid by default(Once page load, after Filtering).

Can someone suggest me how to proceed on this?
Thanks, Malli
Princy
Top achievements
Rank 2
 answered on 23 Dec 2009
1 answer
75 views
Now we are running into a problem that RadProgressBar can't be displayed in Chrome and Safari. 

We can see the progress bar when we upload files with RadFileUpload in IE and FF. But we can't see it in Chrome and Safari.

The version we currently use is Q3 2009 SP1. 

We can't duplicate this error in demo page.


It is marked as "Answered" now.

Is the problem being fixed in latest version? or we mis-configure something cause this problem?


Veselin Vasilev
Telerik team
 answered on 23 Dec 2009
1 answer
141 views
When i created adavancededittemplate in radscheduler with aspx controls..when i editing i click in appointment how can it open directly without asking these two
1) Edit only the occurence
2)Edit onlyseries...
T. Tsonev
Telerik team
 answered on 23 Dec 2009
5 answers
195 views
I'm running version 2009.2.826.20 of the scheduler.  For some reason my multiday appointment is getting cut of at 5:00 pm.  I tried changing the WorkDayEndTime and the DayEndTime but it still cuts it off.  I tried changeing thes same properties in the DayView but to no effect.  Any Idea's
<%@ Page Language="C#" ValidateRequest="false" AutoEventWireup="false" CodeBehind="Scheduler.aspx.cs" Inherits="crm.calendar.Scheduler.Scheduler" MasterPageFile="~/Intranet.Master" %> 
<%@ Register TagPrefix="rad" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
 
<asp:Content ID="Content1" ContentPlaceHolderID="MPTitle" runat="server">  
    Scheduler  
      
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="MPCaption" runat="server">  
    Scheduler  
</asp:Content> 
<asp:Content ID="Content3" ContentPlaceHolderID="MPContent" runat="server">   
    <script type="text/javascript">  
                var selectedAppointment = null;  
                var contextMenuSlot = null;  
                  
                function checkResourceMenuItem(menu, appointment)  
                {  
                    var calendar = appointment.get_resources().getResourcesByType("Calendar").getResource(0);  
                    if (!calendar)  
                        return;  
                          
                    var categorizeItem = menu.findItemByText("Categorize");  
                    //Traverse all menu items below "Categorize"  
                    for (var i = 0; i < categorizeItem.get_items().get_count(); i++)  
                    {  
                        var item = categorizeItem.get_items().getItem(i);  
                        if (item.get_value() == calendar.get_key())  
                        {  
                            //The item corresponds to the current "Calendar" - the Value of the item stores the Key of the resource  
                            item.set_imageUrl("Images/checked.gif");  
                        }  
                        else  
                        {  
                            item.set_imageUrl("");  
                        }  
                    }  
                }  
                  
                //Called when the user right-clicks an appointment  
                function appointmentContextMenu(sender, eventArgs)  
                {  
                    var menu = $find("<%= SchedulerAppointmentContextMenu.ClientID %>");  
                    selectedAppointment = eventArgs.get_appointment();  
                    checkResourceMenuItem(menu, selectedAppointment);  
                    menu.show(eventArgs.get_domEvent());  
                }  
              
                //Called when the user clicks an item from the appointment context menu  
                function appointmentContextMenuItemClicked(sender, eventArgs)  
                {  
                    if (!selectedAppointment)  
                        return;  
                      
                    sender.hide();  
                      
                    var clickedItem = eventArgs.get_item();  
                    var text = clickedItem.get_text();  
                    var scheduler = $find("<%= rsSecheduler.ClientID %>");  
                      
                    if (text == "Categorize")  
                    {  
                        //Do nothing if the user clicked the "Categorize" menu item  
                        return;  
                    }  
                      
                    if (text == "Delete")  
                    {  
                        scheduler.deleteAppointment(selectedAppointment, true);  
                    }  
                    else if (text == "Edit")  
                    {  
                        scheduler.showInlineEditForm(selectedAppointment);  
                    }  
                    else if (clickedItem.get_parent().get_text() == "Categorize")  
                    {  
                        //The user clicked the item corresponding to the "Calendar" resource to which the appointment is assigned  
                        if (clickedItem.get_imageUrl())  
                            return;  
                          
                        //Clear all resources  
                        selectedAppointment.get_resources().clear();  
                        //Find the resource corresponding to the clicked item  
                        var calendar = scheduler.get_resources().getResourceByTypeAndKey("Calendar", clickedItem.get_value());  
                        //Add it to the appointment resources collection  
                        selectedAppointment.get_resources().add(calendar);  
                        //Update the appointment  
                        scheduler.updateAppointment(selectedAppointment);  
                    }  
                }  
                //Called when the user right-clicks empty time slot  
                function timeSlotContextMenu(sender, eventArgs)  
                {  
                    var menu = $find("<%= SchedulerTimeSlotContextMenu.ClientID %>");  
                    contextMenuSlot = eventArgs.get_targetSlot();  
                    menu.show(eventArgs.get_domEvent());  
                }  
                  
                //Called when the user clicks an item from the time slot context menu  
                function timeSlotContextMenuItemClicked(sender, eventArgs)  
                {  
                    sender.hide();  
                      
                    var text = eventArgs.get_item().get_text();  
                    var scheduler = $find("<%= rsSecheduler.ClientID %>");  
                      
                    if (text == "New Appointment")  
                    {  
                        scheduler.showInsertFormAt(contextMenuSlot);  
                    }  
                    else if (text == "New All Day Event")  
                    {  
                        scheduler.showAllDayInlineInsertForm(contextMenuSlot.get_startTime());  
                    }  
                    else if (text == "New Recurring Appointment")  
                    {  
                        scheduler.showAdvancedInsertForm(contextMenuSlot.get_startTime());  
                    }  
                    else if (text == "New Recurring Event")  
                    {  
                        scheduler.showAllDayAdvancedInsertForm(contextMenuSlot.get_startTime());  
                    }  
                }  
                  
                function SwitchValues()  
                {  
                    SwitchTextBoxValue("_ctl0_MPContent_rsSecheduler_Form_txtTaskTextNew", "<%= hfTaskNotes.ClientID %>" );  
                    SwitchTextBoxValue("_ctl0_MPContent_rsSecheduler_Form_rdpStartDate", "<%= hfStartDate.ClientID %>");  
                    SwitchTextBoxValue("_ctl0_MPContent_rsSecheduler_Form_rtpStartTime", "<%= hfStartTime.ClientID %>");  
                    SwitchTextBoxValue("_ctl0_MPContent_rsSecheduler_Form_rdpEndDate","<%= hfEndDate.ClientID %>");  
                    SwitchTextBoxValue("_ctl0_MPContent_rsSecheduler_Form_rtpEndTime","<%= hfEndTime.ClientID %>");  
                    SwitchTextBoxValue("_ctl0_MPContent_rsSecheduler_Form_ddlAssignedTo","<%= hfAssignedTo.ClientID %>");  
                    SwitchTextBoxValue("_ctl0_MPContent_rsSecheduler_Form_ddlTypes","<%= hfType.ClientID %>");  
                }  
                  
                function SwitchTextBoxValue(txtSource, hfDestination)  
                {  
                    var txtSourceControl = document.getElementById(txtSource);  
                    var hfDestinationControl = document.getElementById(hfDestination);  
                      
                    if(txtSourceControl != null && hfDestinationControl != null)  
                    {  
                        //alert(txtSourceControl.value);  
                        hfDestinationControl.value = txtSourceControl.value;  
                        //alert(hfDestinationControl.value);  
                    }  
                }  
            </script> 
              
    <asp:HiddenField ID="hfTaskNotes" runat="server" /> 
    <asp:HiddenField ID="hfStartDate" runat="server" /> 
    <asp:HiddenField ID="hfStartTime" runat="server" /> 
    <asp:HiddenField ID="hfEndDate" runat="server" /> 
    <asp:HiddenField ID="hfEndTime" runat="server" /> 
    <asp:HiddenField ID="hfAssignedTo" runat="server" /> 
    <asp:HiddenField ID="hfType" runat="server" /> 
 
    <rad:RadScheduler   ID="rsSecheduler" OverflowBehavior="Scroll" ColumnWidth="100px" 
                        AdvancedForm-Enabled="false" MonthView-GroupingDirection="Vertical" 
                         WeekView-GroupingDirection="Vertical" TimelineView-GroupingDirection="vertical" 
                        OnClientAppointmentContextMenu="appointmentContextMenu"   
                        OnClientTimeSlotContextMenu="timeSlotContextMenu"   
                        runat="server"  DayStartTime="7:00" DayEndTime="18:00" 
                        WorkDayStartTime="7:00" WorkDayEndTime="18:00" 
                        DataEndField="EndDate" ShowAllDayRow = "false" 
                        DataStartField="DueDate" ShowFooter="false" 
                        DataKeyField="TaskID" MinimumInlineFormWidth=370 
                        DataSubjectField="TaskNote" 
                        AdvancedForm-Modal="true" HoursPanelTimeFormat="htt" ValidationGroup="rsSecheduler" 
                         RowHeight="60px" 
    > 
        <InlineInsertTemplate> 
            <table> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>Start Date:</b> 
                    </td> 
                    <td> 
                        <rad:RadDatePicker ID="rdpStartDate" runat="server" ></rad:RadDatePicker> 
                    </td> 
                    <td> 
                        <rad:RadTimePicker ID="rtpStartTime" runat="server" MaxDate="7:00 pm" MinDate="7:00 am"></rad:RadTimePicker> 
                    </td> 
                </tr> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>End Date:</b> 
                    </td> 
                    <td> 
                        <rad:RadDatePicker ID="rdpEndDate" runat="server" ></rad:RadDatePicker> 
                    </td> 
                    <td> 
                        <rad:RadTimePicker ID="rtpEndTime" runat="server" MaxDate="7:00 pm" MinDate="7:00 am"></rad:RadTimePicker> 
                    </td> 
                </tr> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>Assigned To:</b> 
                    </td> 
                    <td colspan="2">  
                        <asp:DropDownList ID="ddlAssignedTo" DataTextField="AMName" DataValueField="UserID" runat="server"></asp:DropDownList> 
                    </td> 
                </tr> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>Type:</b> 
                    </td> 
                    <td  colspan="2">  
                        <asp:DropDownList ID="ddlTypes" DataValueField="Value" DataTextField="Text" runat="server">  
     <%--                       <asp:ListItem value="OT">Other</asp:ListItem> 
                            <asp:ListItem value="CA">Call</asp:ListItem> 
                            <asp:ListItem value="EM">Email</asp:ListItem> 
                            <asp:ListItem value="MA">Mail</asp:ListItem> 
                            <asp:ListItem value="ME">Meeting</asp:ListItem>--%> 
                        </asp:DropDownList> 
                    </td> 
                </tr> 
                   <td colspan="4">  
                        <table> 
                            <tr> 
                                <td style="width:29%"  align="right" valign="top">  
                                    <b>Related To:</b> 
                                </td> 
                                <td style="width:45%">  
                                    <asp:LinkButton ID="lbRelatedTo" runat="server"></asp:LinkButton> 
                                </td> 
                                <td align="right" valign="top">  
                                    <b>Created By:</b> 
                                </td> 
                                <td> 
                                    <asp:Label ID="lblCreatedBy" runat="server"></asp:Label> 
                                </td> 
                            </tr> 
                        </table> 
                    </td> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>Task Text:</b> 
                    </td> 
                    <td colspan="2">  
                        <asp:textbox id="txtTaskTextNew" runat="server" TextMode="MultiLine" Height="160" CssClass="simple_textarea" Width="100%"></asp:textbox> 
                    </td> 
                </tr> 
            </table> 
            <table> 
                <tr> 
                    <td> 
                        <asp:Button ID="butAddAppointment" Text="Add" CommandName="Insert" OnClientClick="SwitchValues()" runat="server" /> 
                    </td> 
                    <td> 
                        <asp:Button ID="butCancel" Text="Cancel"  CommandName="Cancel" runat="server" /> 
                    </td> 
                </tr> 
            </table> 
        </InlineInsertTemplate> 
         
       <InlineEditTemplate> 
            <table> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>Start Date:</b> 
                    </td> 
                    <td> 
                        <rad:RadDatePicker ID="rdpStartDate" runat="server" ></rad:RadDatePicker> 
                    </td> 
                    <td> 
                        <rad:RadTimePicker ID="rtpStartTime" runat="server" MaxDate="7:00 pm" MinDate="7:00 am"></rad:RadTimePicker> 
                    </td> 
                </tr> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>End Date:</b> 
                    </td> 
                    <td> 
                        <rad:RadDatePicker ID="rdpEndDate" runat="server" ></rad:RadDatePicker> 
                    </td> 
                    <td> 
                        <rad:RadTimePicker ID="rtpEndTime" runat="server" MaxDate="7:00 pm" MinDate="7:00 am"></rad:RadTimePicker> 
                    </td> 
                </tr> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>Assigned To:</b> 
                    </td> 
                    <td colspan="2">  
                        <asp:DropDownList ID="ddlAssignedTo" DataTextField="AMName" DataValueField="UserID" runat="server"></asp:DropDownList> 
                    </td> 
                </tr> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>Type:</b> 
                    </td> 
                    <td  colspan="2">  
                        <asp:DropDownList ID="ddlTypes"  DataValueField="Value" DataTextField="Text"  runat="server">  
     <%--                       <asp:ListItem value="OT">Other</asp:ListItem> 
                            <asp:ListItem value="CA">Call</asp:ListItem> 
                            <asp:ListItem value="EM">Email</asp:ListItem> 
                            <asp:ListItem value="MA">Mail</asp:ListItem> 
                            <asp:ListItem value="ME">Meeting</asp:ListItem>--%> 
                        </asp:DropDownList> 
                    </td> 
                </tr> 
                <tr> 
                    <td colspan="4">  
                        <table> 
                            <tr> 
                                <td style="width:29%"  align="right" valign="top">  
                                    <b>Related To:</b> 
                                </td> 
                                <td style="width:45%">  
                                    <asp:LinkButton ID="lbRelatedTo" runat="server"></asp:LinkButton> 
                                </td> 
                                <td align="right" valign="top">  
                                    <b>Created By:</b> 
                                </td> 
                                <td> 
                                    <asp:Label ID="lblCreatedBy" runat="server"></asp:Label> 
                                </td> 
                            </tr> 
                        </table> 
                    </td> 
                </tr> 
                <tr> 
                    <td align="right" valign="top">  
                        <b>Task Text:</b> 
                    </td> 
                    <td colspan="2">  
                        <asp:textbox id="txtTaskTextNew" runat="server" TextMode="MultiLine" Height="160" CssClass="simple_textarea" Width="100%"></asp:textbox> 
                    </td> 
                </tr> 
            </table> 
              
            <table> 
                <tr> 
                    <td> 
                        <asp:Button ID="butUpdateAppointment" Text="Update" CommandName="Update" OnClientClick="SwitchValues()" runat="server" /> 
                    </td> 
                    <td> 
                        <asp:Button ID="butCancel" Text="Cancel"  CommandName="Cancel" runat="server" /> 
                    </td> 
                </tr> 
            </table> 
        </InlineEditTemplate> 
          
        <AppointmentTemplate> 
            <div style="overflow:auto; height:60px; width:100%; height:100%;">  
                <div class="rsAptSubject">  
                    <asp:Label ID="lblAssignedTo" runat="server"></asp:Label> 
                </div> 
                <br /> 
                <%# (Eval("Subject") as string).Replace("\n", "<br />") %> 
            </div> 
 
        </AppointmentTemplate> 
        <Localization AdvancedAllDayEvent="All day" /> 
        <AdvancedForm DateFormat="M/d/yyyy" Modal="True" TimeFormat="h:mm tt" /> 
    </rad:RadScheduler> 
      
      
            <rad:RadContextMenu runat="server" ID="SchedulerAppointmentContextMenu" OnClientItemClicked="appointmentContextMenuItemClicked">  
            <Items> 
                <rad:RadMenuItem Text="Edit" /> 
                <rad:RadMenuItem IsSeparator="True" /> 
                <rad:RadMenuItem Text="Delete" /> 
            </Items> 
        </rad:RadContextMenu> 
        <rad:RadContextMenu runat="server" ID="SchedulerTimeSlotContextMenu" OnClientItemClicked="timeSlotContextMenuItemClicked">  
            <CollapseAnimation Type="none" /> 
            <Items> 
                <rad:RadMenuItem Text="New Appointment" /> 
            </Items> 
        </rad:RadContextMenu> 
      
</asp:Content> 
 
T. Tsonev
Telerik team
 answered on 23 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?