Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
91 views
How would one set the value for a resource in the code behind (specifically for the Simple Form, not the Advanced Form)

I've tried the following with no luck . . . .

public void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e)
{
    if (e.Appointment.Attributes["Employee"] == string.Empty)
    {
        e.Appointment.Attributes["Employee"] = "555";
    }
}
Boyan Dimitrov
Telerik team
 answered on 19 Sep 2012
5 answers
82 views
Hi,

I have a Telerik RadWindow popup control. If I open some popup in IE, I see always a horizontal scrollbar. If I open the same popup in FF or Chrome I do not see the scrollbar. I see only the space for the scrollbar. This is the code of my masterpage with the radwindow control:

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="CC.RPA.ASP.GUI.SiteMaster" %>
<!DOCTYPE html>
<%--
HTML5 Boilerplate master page:
http://geekswithblogs.net/ranganh/archive/2011/11/17/html5-boilerplate-template-for-asp.net-with-visual-studio-2010.aspx
--%>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]>    <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]>    <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<head runat="server">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title></title>
    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="<%# ResolveUrl("~/favicon.ico") %>">
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" EnableStyleSheetCombine="true"
        OutputCompression="AutoDetect">
        <StyleSheets>
            <telerik:StyleSheetReference Path="~/Styles/Site.css" />
            <telerik:StyleSheetReference Path="~/Styles/Handheld.css" />
            <telerik:StyleSheetReference Path="~/Styles/Skins/Button.css" />
            <telerik:StyleSheetReference Path="~/Styles/Skins/Grid.css" />
            <telerik:StyleSheetReference Path="~/Styles/Skins/Menu.css" />
            <telerik:StyleSheetReference Path="~/Styles/Skins/Window.css" />
            <telerik:StyleSheetReference Path="~/Styles/Skins/CC/Button.CC.css" />
            <telerik:StyleSheetReference Path="~/Styles/Skins/CC/Grid.CC.css" />
            <telerik:StyleSheetReference Path="~/Styles/Skins/CC/Menu.CC.css" />
            <telerik:StyleSheetReference Path="~/Styles/Skins/CC/Window.CC.css" />
        </StyleSheets>
    </telerik:RadStyleSheetManager>
    <script src="<%# ResolveUrl("~/Scripts/modernizr-2.5.2.js") %>" type="text/javascript"></script>
    <asp:ContentPlaceHolder ID="HeadContent" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form runat="server">
    <telerik:RadScriptManager runat="server" LoadScriptsBeforeUI="true" EnableScriptCombine="true"
        OutputCompression="AutoDetect">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            <asp:ScriptReference Path="~/Scripts/Plugins.js" />
            <asp:ScriptReference Path="~/Scripts/Script.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager runat="server" DefaultLoadingPanelID="AjaxLoadingPanel">
    </telerik:RadAjaxManager>
    <asp:ContentPlaceHolder ID="MainContent" runat="server">
    </asp:ContentPlaceHolder>
    <telerik:RadWindowManager ID="WindowManager" runat="server" Modal="true" ReloadOnShow="true" MinWidth="400px">
        <Localization Yes="<%$ Resources: Buttons, Yes %>" No="<%$ Resources: Buttons, No %>" />
        <%-- TODO: Skin radalert en radconfirm popups.
        <AlertTemplate>
            <div class="rwDialogPopup radalert">
                <div class="rwDialogText">
                    {1}
                </div>
                <div class="buttons center">
                    <a class="RadButton RadButton_Default rbLinkButton button ok" onclick="$find('{0}').close(true);"
                        href="javascript:void(0)" tabindex="0"><span class="rbText">
                            <asp:Literal runat="server" Text="<%$Resources:Buttons,OK %>" /></span></a>
                </div>
            </div>
        </AlertTemplate>
        --%>
<%--        <ConfirmTemplate>
            <div class="rwDialogPopup radconfirm">
                <div class="rwDialogText">
                    {1}
                </div>
                <div class="buttons center">
                    <a class="RadButton RadButton_Default rbLinkButton button yes" onclick="$find('{0}').close(true);"
                        href="javascript:void(0)" tabindex="0"><span class="rbText">
                            <asp:Literal ID="Literal1" runat="server" Text="<%$Resources:Buttons,Yes %>" /></span></a>
                </div>
            </div>
        </ConfirmTemplate>
--%>
        <Windows>
            <telerik:RadWindow ID="rwEditEntity" runat="server" Modal="true" ReloadOnShow="true"
                KeepInScreenBounds="true" Behaviors="Move" VisibleStatusbar="false" VisibleTitlebar="true"
                Width="850px" Height="500px" AutoSize="true" AutoSizeBehaviors="Height" />
        </Windows>
    </telerik:RadWindowManager>
    <telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel" Skin="" runat="server" BackgroundPosition="Center"
        Transparency="30">
        <div class="loading">
            <asp:Image ID="Throbber" runat="server" ImageUrl="~/App_Themes/CC_Theme/images/throbber.gif" />
        </div>
    </telerik:RadAjaxLoadingPanel>
    </form>
</body>
</html>

What is the problem? I hope someone can help me. See also attachments (IE: Not OK, FF and Chrome: OK).
rdmptn
Top achievements
Rank 1
 answered on 19 Sep 2012
1 answer
136 views
I have seen the Partial Ajaxification demo and it is almost what I need. In demo scenario each button in grid updates a single control outside of the grid. My scenario is slightly more complicated. Firstly I have two controls outside a repeater that should update themselves and some controls in repeater items. Controls in repeater items should update themselves, controls in other repeater items and also controls outside.
Structure looks somewhat like this:

<i:PeCa runat="server" ID="PicHolder"/>
<i:PeCa runat="server" ID="PicPartner"/>
<asp:Repeater ID="RptChildren" runat="server" OnItemDataBound="RptChildren_ItemDataBound"> <ItemTemplate> <iak:PeCa runat="server" ID="PicChild"/> </ItemTemplate> </asp:Repeater>

So PicHolder updates PicHolder, PicPartner and multiple PicChild in repeater. PicPartner updates PicPartner, PicHolder and PicChildren.  Each PicChild updates iteslf, other PicChild and PicPartner and PicHolder.
I understand I should construct ajax manager structure in codebehind, but it doesn work. I wanted to use AjaxUpdatedControlsCollection class to collect all updated controls, but I don't know which ID I should use. The same problem is when I create AjaxSetting for child inside repeater - what ID to use here? "PicChild"? Or should I use RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting method and add each control several times, for each control it updates?
Maria Ilieva
Telerik team
 answered on 19 Sep 2012
1 answer
66 views
I am currently using RadScheduler with webservice bindings.

I need to perform some processing on an appointment and its resources before saving it, but I need to do this server side. I was hoping someone could give me some guidance on how to go about this. My current thought it to add my own method to the webservice and call it manually. But I'm unsure how I would call this from the client and post along the appointment data? This must already happen somewhere for the webservice calls to GetAppointments, InsertAppointments etc so I was hoping I could use similar code.

For example, if I was to add the following method to my webservice, how could I call this from the client side javascript?

[WebMethod]
public bool DoServerSideStuff(SchedulerInfo schedulerInfo, AppointmentData appointmentData)
{
return MyClass.DoSomething(schedulerInfo, appointmentData)
}

 
William
Plamen
Telerik team
 answered on 19 Sep 2012
2 answers
107 views
Hi Telerik,

I'm have created an dynamic RadComboBox object and use it as the result of PageMethods.[WebMethod name].

When the client side receives this result back I'm try to create a html object from this response and add the html object to div tag on webpage.

But I found this method it doesn't work properly in many parts such as RadScriptManager not define style-sheet.

So please advise me for the correct solution or give me an example.

Best Regards,
Mr.Wanlop N (Ball)
wanlop
Top achievements
Rank 1
 answered on 19 Sep 2012
1 answer
254 views
How can I disable a RadButton afert user clicked it and have a postback? I try following code in OnClientClicked event:
 $('#<%=RadButtonProcess.ClientID%>').prop('disabled', true);

The button is disabled but the postback is not fired. I don't know how to continue the postback after disable the button?
Shinu
Top achievements
Rank 2
 answered on 19 Sep 2012
9 answers
214 views

I have a tabstrip and a multipage view that are dynamically populated.  This works fine when scrollChildren is by default set to false, the tabstrip wraps (it shows as two rows) and fits in side of the table and divs that contain it (as this is content page for a master page). When I change the mode to scroll children as I only want one row of tabs, that are scrollable, the tabstrip shows up as longer than the parent table and divs, and the scroll bar is off the page.

Any solutions?
Below is the sample code. The master page it is in is just the standard default masterpage.

Thanks!


 

 

 

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="WebForm1.aspx.vb" Inherits="_3POC.WebForm1"  %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
  
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
      
  
    <link href="Styles/styles.css" rel="stylesheet" type="text/css" />
    <!--[if lt IE 7]> <style type="text/css">@import "ie6.css";</style><![endif]-->
      
  
      
  
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent" >
   
    <table><tr>
    <td style="vertical-align:top;">
               <telerik:RadDockZone ID="RadDockZone2" BorderStyle="None" runat="server" 
            Orientation="Vertical" Width="100%" height="100%" MinWidth="50px" minHeight="100px" FitDocks="False" 
            Skin="Office2007" HighlightedCssClass="dockzone">
                        <telerik:RadDock ID="RadDock1" runat="server" Title="Tools" Width="275px" EnableAnimation="true"
                            EnableRoundedCorners="true" Resizable="true" Skin="Office2007">
                            <ContentTemplate>
                                <telerik:RadPanelBar runat="server" ID="RadPanelBar1" >
                <CollapseAnimation Type="OutQuart" Duration="200"></CollapseAnimation>
                <Items>
                    <telerik:RadPanelItem Text="Patient Info" Expanded="True">
                        <ContentTemplate>
                        MRN: 1234s <br />
                        Patient Name: Eric Dalnas <br />
                        Patient age: 34 <br />
                        </ContentTemplate>
                         
                    </telerik:RadPanelItem>
                     <telerik:RadPanelItem Text="Notes">
                        <Items>
                            <telerik:RadPanelItem Text="My Notes"></telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="Notes List"></telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="Shared Notes"></telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="Archive"></telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelItem>
                    <telerik:RadPanelItem Text="Future Use 1">
                        <Items>
                            <telerik:RadPanelItem Text="My Contacts"></telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="Address Cards"></telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="Phone List"></telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="Shared Contacts"></telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelItem>
                    <telerik:RadPanelItem Text="Future Use 2">
                        <Items>
                            <telerik:RadPanelItem Text="My Tasks"></telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="Shared Tasks"></telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="Active Tasks"></telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="Completed Tasks"></telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelItem>
                     
                    <telerik:RadPanelItem Text="Future Use 4">
                        <Items>
                            <telerik:RadPanelItem Text="My Client.Net"></telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="My Profile"></telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="My Support Tickets"></telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="My Licenses"></telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelItem>
                </Items>
                <ExpandAnimation Type="OutQuart" Duration="200"></ExpandAnimation>
            </telerik:RadPanelBar>
                            </ContentTemplate>
                        </telerik:RadDock>
                    </telerik:RadDockZone>
  
         
        </td>
    <td style="border-style:none; vertical-align:top;">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional" >
        <ContentTemplate>
          
       <telerik:RadTabStrip ID="tabMain" runat="server" 
                MultiPageID="multiPageMain" Skin="Office2007"
            AutoPostBack="True" ></telerik:RadTabStrip>
     <telerik:RadMultiPage ID="multiPageMain" runat="server" 
            RenderSelectedPageOnly="True" >
        </telerik:RadMultiPage>
          
        </ContentTemplate>
        <Triggers>
        <asp:AsyncPostBackTrigger ControlID="tabMain" />
        </Triggers>
        </asp:UpdatePanel>
    </td></tr>
      
    </table>
       
                                  
           
          
       
          
          
        
   
  
  
  
      
        <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
        </asp:ScriptManagerProxy>
        <asp:UpdateProgress id="UpdateMessagesProgress" DynamicLayout="false" runat="server" visible="true" DisplayAfter="250">
 <ProgressTemplate>
 <div id="progressBackgroundFilter"></div>
        <div id="processMessage" style=" text-align:center;"> Processing...<br /><br />
             <img alt="Loading" src="Images/busy.gif" />
        </div>
  
 </ProgressTemplate>
 </asp:UpdateProgress
         
      
    </asp:Content>

Kate
Telerik team
 answered on 19 Sep 2012
2 answers
142 views
Hi there, i have an issue with the RadProgressArea when used in conjunction with the RadUploader.

When uploading a large file, if the Cancel button is pressed, the file corredctly stops uploading, however the ProgressArea and uploader window remain on the screen.

ideally i would like for the progress area to be hidden if the Cancel button is clicked during the upload.

Any advice on how to achieve this would be gratefully received.

My thanks in advance.
Kate
Telerik team
 answered on 19 Sep 2012
1 answer
74 views
Hi there,

I have a Radgrid with server-side databinding and an onneeddatasource-event. 
I want to change the pagesize dynamically in addiction to the mastertableview-size.
All looks good but when the TableView was updated with the new pagesize, i can't select the rows anymore...

The Script:
<script type="text/javascript">
    function GridCreated(sender, eventArgs) {
            //gets the main table scrollArea HTLM element  
            var scrollArea = document.getElementById(sender.get_element().id + "_GridData");
            var tvHeight = scrollArea.offsetHeight;
            var size = Math.floor(tvHeight / 64);
            //alert(size);
            var tableView = $find("<%= RadGridView.ClientID %>").get_masterTableView();
            tableView.set_pageSize(size);
    }
</script>

HTML-Code:
<telerik:RadGrid ID="RadGridView" AutoGenerateColumns="False" onitemdatabound="RadGridViewItemDataBound" OnItemCreated="RadGridViewItemCreated" AllowSorting="True" AllowPaging="True" EnableViewState="True" OnPageIndexChanged="RadGridPageIndexChanged" OnNeedDataSource="RadGridView_NeedDataSource" runat="server">
<PagerStyle Mode="NextPrev" Position="Bottom" AlwaysVisible="True" CssClass="RadGridPager" PagerTextFormat="Seite blättern: {4} Seite {0} / {1} - Einträge {2} - {3} / {5}"/>
<ClientSettings>
    <Selecting AllowRowSelect="true" />
    <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />
    <ClientEvents OnGridCreated="GridCreated" />
</ClientSettings>
<MasterTableView TableLayout="Fixed" Font-Size="18px" ClientDataKeyNames="IsBlueLight,IsFailure,IsStopped,OrderNr,ObjectNr" DataKeyNames="OrderNr">
    <NoRecordsTemplate>
        <div>
            Keine Einträge
        </div>
    </NoRecordsTemplate>
    <Columns>
         .........
</telerik:RadGrid>

Code-Behind:
....
protected void RadGridView_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    RadGridView.DataSource = Session[Constants.ORDERLIST] as List<Auftrag>;
}
....


thanking you in anticipation

Best regards,
Markus 
Tsvetina
Telerik team
 answered on 19 Sep 2012
1 answer
193 views
I have purchased lartest Telerik and updated to the latest patch  (Q2 2012 SP2). I'm using the RadEditor in default configuration without any mofdification or custom providers.

The Image Editor Dialog loads with the blank image when I folow the steps as mentioned below.

1. Click on "Image Manager" button in the toolbar of the editor
2. Image Manager dialog opens and selec an image from the list hich pushes the image to the right hand side pane (im.jpg)
3. Click on the "Image Editor" at the top of the pane as described in 2 above
4. Image Editor dialog opens up with a balnk image (ie.jpg)

Screen shots are attached to show my case and the code snippet is also given below.
Pleas help!


<telerik:RadEditor
    runat="server"
    AllowScripts="true"
    DialogsCssFile="~/_Global/css/RadEditor_Skin.css"
    ToolsFile="~/_Global/modules/telerik_editor/ToolsFile.xml"
    TableLayoutCssFile="~/_Global/css/TableLayoutCss.css"
    Skin="Outlook"
    ID="radEdtContent"
    width="100%"
    Height="500px">
    <CssFiles>
      <telerik:EditorCssFile Value="~/_Global/css/RadEditor_Skin.css" />
    </CssFiles>
</telerik:RadEditor>

string[] sImagePath = new string[] { "~/_Global/" + ModuleProperties.SiteID + "/img/content" };
 radEdtContent.ImageManager.ViewPaths = sImagePath;
 radEdtContent.ImageManager.UploadPaths = sImagePath;
Rumen
Telerik team
 answered on 19 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?