Telerik Forums
UI for ASP.NET AJAX Forum
14 answers
703 views
My company is considering evaluating your asp.net ajax controls.  Quick question: In an ASP.Net web app, how do your ajax controls handle forms authentication expiration on the client?  When a ajax call is made, do your controls gracefully handle the timeout and prompt the user to re-login?  If not, do you have any documentation that discusses best practices on how to implement this in asp.net web applications?  I'm surprised how there is very little information on the subject.  Thanks in advance.
Gosha
Top achievements
Rank 1
 answered on 04 Apr 2011
1 answer
78 views
Hello,

Let me try to explain the subject. I have a page with RadAjaxManager and need to get hold of it when application initially loads. I am doing it like that:
var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(this).ClientID %>");

 problem is that it works fine when I open page in localhost, like http://localhost. However, when I change localhost to something else (like http://sameMachine), it can't get it and returns null.

Here is sample page:
<html lang="en">
<head id="Head1" runat="server">
    <meta charset="utf-8" />
    <title>Blah</title>
</head>
<body>
    <form id="form1" class="form" runat="server">
    <telerik:RadScriptManager ID="ScriptManager" runat="server" EnablePageMethods="True"
        EnableTheming="True">
    </telerik:RadScriptManager>
    <div id="Div1" class="page" runat="server">
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" Skin="Sitefinity" />
            <telerik:RadAjaxManager ID="RadAjaxManager" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="testButton">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="testButton" UpdatePanelHeight="" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
          <asp:Button ID="testButton" runat="server" Text="Test Me" OnClientClick="TestMe('button');" />
    </div>
    <script type="text/javascript">
        function TestMe(argument) {
            var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(this).ClientID %>");
            if (ajaxManager == null) {
                alert('NULL. called by ' + argument);
            }
            else {
                alert('Got it from ' + argument);
            }
        }
 
        window.attachEvent("onload", function () {
           // will work fine if run on localhost
            TestMe('window.onload');
        });
 
       
    </script>
    </form>
</body>
</html>

Please advise.

Thanks,
Nick
Iana Tsolova
Telerik team
 answered on 04 Apr 2011
3 answers
126 views
Hello Everyone

I have an error during my compilation.
I am trying this link.
http://www.telerik.com/help/aspnet-ajax/data-binding-exchange-provider.html

When i import this:
Telerik.Web.Examples.Scheduler.Exchange

It can not find the .Examples.Scheduler.Exchange. I think it is with the version of the the telerik

Hoping for a quick reply.

Thank you
Erwin
Peter
Telerik team
 answered on 04 Apr 2011
5 answers
121 views
Hi,

When I use the Image Manager to insert an image into the contents of the RadEditor a link like <img alt="" style="width: 120px; height: 150px;" src="/CMS/Upload/Media/7038fa0c-61ec-46ae-a397-b899dc3b21e3.jpeg" complete="complete" complete="complete" /> is inserted (when I switch from the design view to the html view).
This is not xhtml compliant.
It is unclear to me why the attribute complete="complete" is inserted and why it's inserted twice.

Please inform me how to avoid such invalid attributes when inserting images.

Regards,

Mink
Rumen
Telerik team
 answered on 04 Apr 2011
1 answer
241 views
Hi,

Note: it's quick and dirty :)

I needed to customize the "Select" button's view to match UI, it should have had:
1)only button, no 'fake' file input, no file list, nothing, only immediate 1 file upload (to set current picture)
2)round corners
3)different style when hovered
4)resize to match inner text when site's language is changed

Note: when button is hovered in browsers that support Flash/Silverlight cursor doesn't change to 'pointer' type, but does in IE 64-bit.
I didn't investigate much, simple setting cursor: pointer !important; didn't do the trick (admins, any ideas?)

Ok, you will need to create 3 background png images (2 for button's left part (one with active image another passive) and 1 for the right part, the round corner). Note that I use one of left background images as background for ruUploadProgress span when there is an upload happening with a file name being uploaded.

.createContentPageAdditionalOptions .RadUpload
{
    width:100px !important;
}
.RadUpload input
{
    font-family: verdana !important;
}
.createContentPageAdditionalOptions .RadUpload input.ruFakeInput
{
    display: none;
}
.RadUpload input.ruBrowse
{
    background: url(/Images/btnLeftPartInactive.png) top left no-repeat !important;
    width: auto !important;
    line-height:21px;
    height:23px;
    text-align:left;
    margin:0px 3px 0px 0px !important;
    padding:0px 8px 3px 18px !important;
.createContentPageAdditionalOptions .RadUpload .ruInputs
{
    text-align:center;
}
.RadUpload input.ruBrowse,
.createContentPageAdditionalOptions .RadUpload .ruUploadProgress,
.createContentPageAdditionalOptions .RadUpload .ruCancel,
.createContentPageAdditionalOptions .RadUpload .ruRemove
{
    color:#fff !important;
}
.createContentPageAdditionalOptions .RadUpload .ruUploadProgress
{
    background: url(/Images/btnLeftPartInactive.png) top left no-repeat !important;
    margin:0px 3px 0px 0px !important;
    height:23px;
    overflow:hidden;
    width:80px;
}
.RadUpload input.ruButtonHover
{
    background: url(/Images/btnLeftPartActive.png) top left no-repeat !important;
    color: #d14b35 !important;
}
.RadUpload .ruFileWrap
{
    width: auto !important;
    padding: 0px !important;
    background: url(/Images/btnRightPart.png) top right no-repeat !important;
.RadUpload input.ruBrowse,
.createContentPageAdditionalOptions .RadUpload .ruCancel,
.createContentPageAdditionalOptions .RadUpload .ruRemove,
.RadUpload input.ruFileInput 
{
    cursor: pointer !important;
}

Note createContentPageAdditionalOptions class, I use it here cause I don't want to change the view of all asyncuploads I have, just particular one, next step, on the page where you have the control add following snippet:

var modules = Telerik.Web.UI.RadAsyncUpload.Modules;
       if (modules && (modules.Silverlight.isAvailable() || modules.Flash.isAvailable())) {
           $(".ruFileWrap").live("mouseover mouseout", function (event) {
               $(this).children("input[class != 'ruFakeInput']").toggleClass("ruButtonHover");
           });
       }

This will enable native hovering to work when browser is using Flash/Silverlight object.

Finally my control:
<telerik:RadAsyncUpload runat="server" ID="RadAsyncUploadImageForNavNode" AllowedFileExtensions="jpg,jpeg,png,gif"
                   CssClass="divToBeCentered" MaxFileSize="5242880" MultipleFileSelection="Disabled" 
                   OnFileUploaded="RadAsyncUploadImageForNavNode_FileUploaded" EnableInlineProgress="false" Width="120px"
                   MaxFileInputsCount="1" OnClientFileUploaded="RadAsyncUploadImageForNavNode_OnClientFileUploaded"
                   Localization-Select="<%$ Resources:PGC, ProjectContentElement_UploadImage %>"
                   Localization-Cancel="<%$ Resources:PGC, General_Cancel %>"
                   Localization-Remove="<%$ Resources:PGC, General_Remove %>"
                   >
               </telerik:RadAsyncUpload>

and JS it calls when upload completes:

function RadAsyncUploadImageForNavNode_OnClientFileUploaded(sender, args) {
            $("#btnRefreshUploadedImageToCurrentProjectElementStub").click();
        }

so that postback happens immediately and picture is set.

That's it, hopefully someone will find this usefull :)

P.S.: attached file has 4 views: default, hovered, uploading and default again (after upload)
Genady Sergeev
Telerik team
 answered on 04 Apr 2011
1 answer
156 views

Dear,

I want to access a pane and set it's content url.it works by using

var contentPane = $find("<%= PaneRight.ClientID %>");
and not works by using
var splitter = GetRadSplitter();
var pane = splitter.getPaneById("PaneRight");

the page source below
<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Base.Master" AutoEventWireup="true"
    CodeBehind="RptAuth.aspx.cs" Inherits="Rp.UI.ReportManager.RptAuth" %>
  
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
  
    <script type="text/javascript" language="javascript">
        function GetRadSplitter() {
            return $find("<%= RadSplitter1.ClientID %>");
        }
  
        function tvClientNodeClicked(sender, eventArgs) {
            var node = eventArgs.get_node();
            if (node.get_nodes().get_count() > 0) {
                return;
            }
//            var splitter = GetRadSplitter();
//            var pane = splitter.getPaneById("<%= PaneRight.ClientID %>");
//            debugger;
            var contentPane = $find("<%= PaneRight.ClientID %>");
            if (!contentPane) return;
  
                 }
    </script>
  
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Vertical" BorderSize="0"
        BorderStyle="None" Height="100%" Width="100%">
        <telerik:RadPane ID="PaneLeft" runat="server" Scrolling="None" Height="100%" Width="180px">
            <div style="border-top-style: solid; border-top-width: 1px; border-top-color: #3333CC">
                <telerik:RadTreeView ID="tvUser" Height="100%" Width="100%" runat="server" OnClientNodeClicked="tvClientNodeClicked">
                    <Nodes>
                                   </div>
        </telerik:RadPane>
        <telerik:RadSplitBar runat="server" ID="RadSplitBar1" CollapseMode="Forward" />
        <telerik:RadPane ID="PaneRight" runat="server" Scrolling="Both">
        </telerik:RadPane>
    </telerik:RadSplitter>
</asp:Content>

I noticed that all the demo have used the second way to access the specified pane.how to fix my code?

thanks

Kevin
Dobromir
Telerik team
 answered on 04 Apr 2011
1 answer
72 views
Is there a list of features that being added to the RibbonBar control in SP1?  I checked the PITS system, but don't see anything there for the RibbonBar at all.

I have mentioned a couple of missing features/bugs in a previous issue which I was told were already on the to-do (Thanks! btw). 

Is there by chance going to be a server side OnClick/OnCommand event available for a RibbonBarButton with CommandName and CommandArgument properties?  How about a NavigateUrl for RibbonBarButton?

Thanks again!  I really love this new control.  We aren't planning on going live with it for a few months, but I at least want to make sure some of these features will eventually be added to the control.
Simon
Telerik team
 answered on 04 Apr 2011
1 answer
111 views

Hi,

I’ve got a problem using the RadTooltipManager combined with RadDatePicker. I was able to fix the Problem on Firefox but not on IE and I don’t know what to do to get it work.

The problem is that the RadToolTip shows the wrong date as you can see on Screenshot 1.

After adding the Calendar-ClientEvents-OnCalendarViewChanged event to the DatePicker with the following JS-function


function OnCalendarViewChanged(sender, args) {
                    element = sender.get_element();
                    tooltipmanager = $find("<%=RadToolTipManager1.ClientID %>");
                    tooltipmanager.tooltipify(sender.get_element());
                }


the problem is solved in FireFox as you can see on Screenshot 2. But in the IE the problem still exists…

I hope you are able to help me to fix this.

I'm using the Version 2010.3.1502.35

Svetlina Anati
Telerik team
 answered on 04 Apr 2011
3 answers
103 views
Hi,
In Scheduler month view,I want to display the dates from other months  in  a diff color than dates inthe current  month, so that it is easy for the user.
 
For e.g.: Scheduler monthview for September 2009 shows August (30, 31) and October (1, 2, and 3). I wantto set Grey color to August and October dates. How to do this?

p.s. the sameissue in Week view  too.

Any clues/hints would help.
 
Thanks
Sabarish
Veronica
Telerik team
 answered on 04 Apr 2011
5 answers
557 views
Hey guys,
After looking thru the forums I can't seem to find anything to help me.  I am wondering if it is possible to only show the actual month in the MonthView and NOT show the last/next few days of the previous/next month?  I have two RadSchedule control on a page to give a 2 month view but the week of the next month is distracting to see twice ( example of month overlap )  Is there an easy way I can suppress the extra days?
Thanks,
Bryan Smouse
Veronica
Telerik team
 answered on 04 Apr 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
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
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?