Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
220 views
I am using the RadUpload control along with the Rad Progress bar. This was working fine for more than year. Recently we had to add another HttpModule to track the Url in our website. Since then the Rad Progress bar does not show at all. I even downloaded the latest Telerik demo project and added  a simple TestModule. This also breaks the Rad Progress bar.   

using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Configuration;
 
namespace HttpModules
{
    public class TestModule : IHttpModule
    {
        protected log4net.ILog logger = log4net.LogManager.GetLogger("File");
 
        public void Init(HttpApplication app)
        {
            app.BeginRequest += new EventHandler(OnBeginRequest);
        }
 
        public void OnBeginRequest(Object sender, EventArgs e)
        {
            try
            {
                logger.InfoFormat("TestModule => OnBeginRequest");
 
                HttpApplication app = (HttpApplication)sender;
                HttpContext context = app.Context;
 
                logger.InfoFormat("TestModule => This is just a Test module");
 
                if (IsTelerikRequest(context.Request))
                    return;
 
                string source = context.Request["source"];
 
                if (!string.IsNullOrEmpty(source))
                {
                    logger.InfoFormat("TestModule => source is {0} ", source);
                }
 
            }
            catch(Exception ex)
            {
                logger.Error("Error in Test Module", ex);
            }
        }
 
        private bool IsTelerikRequest(HttpRequest httpRequest)
        {
            logger.InfoFormat("TestModule => IsTelerikRequest (httpRequest.RawUrl : '{0}')", httpRequest.RawUrl);
            return httpRequest.RawUrl.Contains("RadUploadProgressHandler.ashx");
        }
 
        private static bool IsAjaxRequest(HttpRequest request)
        { 
            if (request == null) 
            {
                throw new ArgumentNullException("request");
            } 
            
            return (request["X-Requested-With"] == "XMLHttpRequest") || ((request.Headers != null) && (request.Headers["X-Requested-With"] == "XMLHttpRequest")); 
        }
 
        public void Dispose() 
        {
 
        }
    }
}
Dimitar Terziev
Telerik team
 answered on 29 Mar 2011
3 answers
126 views
Hello,

I am using the trial version of Telerik ASP.NET controls. I came across the following 2 issues:

1. Adding custom command to the raddoc then its images are not appearing on the DocTitleBar.

.rdCustomize
  {
      width: 25px;
      height: 25px;
      cursor: pointer;
      background: url('../Images/1.gif') transparent !important;
  }

<telerik:RadDock ID="RadDock1" runat="server" Width="250px" EnableAnimation="true"
                                            Height="250px" Resizable="true" Skin="Sitefinity" Tag="CSMD_Average_Response_Time"
                                            Title="1">
                                            <Commands>
                                                <telerik:DockCloseCommand />
                                                <telerik:DockExpandCollapseCommand />
                                                <telerik:DockCommand CssClass="rdCustomize" Name="doEdit" Text="Customize" />
                                                <telerik:DockCommand CssClass="rdCustomize" Name="doRefresh" Text="Refresh" />
                                            </Commands>
                                            <ContentTemplate>
                                                <div>
                                                    <uc:AvgResolutionTimeFL ID="CSMD_AvgResolutionTimeFL" runat="server"></uc:AvgResolutionTimeFL>
                                                </div>
                                            </ContentTemplate>
                                        </telerik:RadDock>

2. Surprisingly I got error messages on the design window. Plz find the attachment for it.

Can you plz suggested me to do this the better manner ?
Pero
Telerik team
 answered on 29 Mar 2011
2 answers
114 views
I am trying to make a page which operates mostly on the client with radrotator.  you can think of it as a simple slide-show type interface.  radrotator has thumbnails, which switching between index, larger image updates (along with some other things)

I am using hash parameters in the URL to allow users to "bookmark" pages meaningfully, and below is what i see as the relevant javascript code.

i use a boolean "stateHandled" variable which lets the code know whether or not it should look at the hash value and update the page accordingly, or if the state change has already been handled....

thus, if user presses back button, the onhashchange event updates the gui.
on the other hand, if user interacts with the radrotator - the onhashchange event does nothing.

what is REALLY weird is that all of this works fine except for one thing...  the animation of the radrotator is suppressed now for when the user is changing the index via interactions with the radrotator, but the forward/back buttons of the browser work fine (they have animation).

window.onload = function () {
    initializeStateFromURL();
}
  
window.onhashchange = function () {
    initializeStateFromURL();
}
  
function initializeStateFromURL() {
    if (!stateHandled) {
        var navSetting = window.location.hash;
        var slide = FromHash("slide", navSetting);
        if (slide) {
            SetRotatorToSlideID(slide);
        }
    }
}
  
var stateHandled = false;
  
function SetRotatorToSlideID(slideID) {
    var items = rotator.get_items();
    for (i in items) {
        if (slideID == GetAttributeValue(items[i], "SlideID")) {
            rotator.set_currentItemIndex(items[i].get_index(), true);
            UpdateGUI(items[i]);
        }
    }
}
  
function RotatorClientItemShowing(sender, args) {
    stateHandled = true;
    UpdateGUI(args.get_item());
    stateHandled = false;
}
  
function RotatorClientItemClicked(sender, args) {
    stateHandled = true;
    sender.set_currentItemIndex(args.get_item().get_index(), true);
      
    UpdateGUI(args.get_item());
    stateHandled = false;
}
  
function UpdateGUI(item) {
    //update some things on the page
  
    setHash(GetAttributeValue(item,"DocumentID"),GetAttributeValue(item,"SlideID"));
}


on the other hand, if i make the changes to the above code, having:

function RotatorClientItemShowing(sender, args) {
    stateHandled = true;
    UpdateGUI(args.get_item());
}
   
function RotatorClientItemClicked(sender, args) {
    stateHandled = true;
    sender.set_currentItemIndex(args.get_item().get_index(), true);
       
    UpdateGUI(args.get_item());
}


then the animations work fine...  (however the logic of the code isn't exactly perfect... the forward/back buttons only work every other hash change)

any ideas?  thanks.
Felipe
Top achievements
Rank 1
 answered on 29 Mar 2011
1 answer
86 views
Hi there,

Are you planing to support Telerik RadInput with the RadInputManager?  This is great for standard ASP.Net controls, but what if our page already is using telerik controls?  It would be great to be able to benefit the optimization of the InputManager with Telerik controls as well.

Thanks.
Maria Ilieva
Telerik team
 answered on 29 Mar 2011
1 answer
85 views
Hi,
I'm struggling to export a radgrid to csv or excel on client side. My grid is declarative created in aspx page and the structure is generated in Page OnInit. There are multiples GridTemplateColumns created with HeaderTemplate and ItemTemplate. Inside the ItemTemplate is a RadioButtonList created.
The problem is that the data from GridTemplateColumns is excluded from generated csv file.
I saw to following post:
http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/radgrid-export-to-csv-for-dynamic-gridtemplatecolumn.aspx
What I'm asking here is maybe something was changed in terms of client side exporting from the date of the previous post.
Thank you
Catalin
Daniel
Telerik team
 answered on 29 Mar 2011
1 answer
106 views
I've come across an odd thing happening on my dock's background when dragging an item that exists in a zone on it's own, vs what happens when you drag a widget that has other items in the same dock with it. Screenshots attached will explain further, but basically, it looks like it uses the zone's height when the item's on its own (smallzone.png).
If there's another item/widget under or above the item you're dragging, its background uses the desired output (desiredzone.png).

I've set the MinHeight on the zones to make sure it's more than just a thin band of grey that the user will barely be able to see (in case I can't get around it) but is there a way to make it use the item's height instead of the zone's when there's only one item present? Thanks.
Pero
Telerik team
 answered on 29 Mar 2011
1 answer
163 views
Hi all,

I have a radgrid which is in a radpanel that has a radtoolbar which contains the buttons 'New' and 'Delete'. I managed to write code to select the row in the radgrid once and clicking the delete button in my radtoolbar to trigger the function to delete it from the db. However, I want to be able to also have a double-clicking event whereby when you click twice, it will redirect to another page on my website.

Currently in my radgrid I used the OnSelectedIndexChanged="CaseListRG_SelectedIndexChanged" and in the code behind I will retrieve the id of the clicked row, which is working fine. But because I want to actually click twice to redirect, it doesnt work because when I click once it already triggers OnSelectedIndexChanged="CaseListRG_SelectedIndexChanged". Hence I am unable to do the redirecting.

Is there anyway at all for me to actually do a single click on row and retrieve the case_id of the selected row in code behind and do a double click on row and redirect to another page?

I hope Im making sense? Any advice is appreciated.
Hus Damen
Top achievements
Rank 1
 answered on 29 Mar 2011
2 answers
78 views
Hi, is there a way to change the item "main" (the one in the middle, don't know how to call it) content?

E.g.:
I have soccer teams pictures in the coverflow, but when an image goes to the middle, I want to change its content.

Probably OnClientItemShown event should be used, right? But I want to show some data from DB, so is there a way how to do this on server side so I can code it in C#?

Thank you
Niko
Telerik team
 answered on 29 Mar 2011
9 answers
65 views

 

When my grid opens up in Iexpore 7 or 8 in compatibility mode it looks all squished.  It appears to be ignoring the widths I setup.  Anyone else see this?
Pavlina
Telerik team
 answered on 29 Mar 2011
1 answer
259 views
Hi!  Is there a way to prevent the RadEditor from wrapping lines in the HTML tab? 

When text is pasted into the Design tab of the editor it goes all the way across the width of the editor.  However when clicking on the HTML tab the lines appear to be wrapped, that is only going partially across the width of the editor, even though I do not see any actual <br> tags or line feeds.

Is it perhaps due to the width of the editor?  I notice on another page where the editor is used, the editor is much smaller and doesn't appear to behave this way.

Thanks!

Rumen
Telerik team
 answered on 29 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?