Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
40 views
Hello,

I have a radrid with one column setup for printing the object associated with the ID of the row.  Works great unless I ajaxify the grid either wrapping with an AJAX panel or using an ajax manager on the page then I get a javascript error on postback wchihc makes sense because the ajax manager or panel will be trying to interpret the response.  How to I bypass the ajax panel for this one behaviour and have the browser rather than the ajax manager respond to the new contect header information?
protected void radGridAll_ItemCommand(Object sender, GridCommandEventArgs e)
        {
            if (e.CommandName != "Print" ) return;
  
            Guid id = Guid.Parse(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"].ToString());
  
            //lblMessage.Text = string.Empty;
  
            switch (e.CommandName)
            {
  
                case "Print":
  
                    //string args = Request.QueryString["ApplicationID"];
  
                    NMotionServer.ApplicationLead _application = NMotionServer.ApplicationLeadService.GetByID(id);
  
                    if (_application.LeadStatusID == (int)enumLeadStatus.Fresh || _application.LeadStatusID == (int)enumLeadStatus.Viewed)
                    {
                        AppHistory _leadStatusEvent = new AppHistory() { ApplicationLeadID = _application.ID, EventTypeID = 2, ForeignKeyID = (int)enumLeadStatus.Printed, Timestamp = DateTime.Now, UserProfileID = ((UserProfile)Session["_userProfile"]).ID };
                        AppHistoryService.Save(_leadStatusEvent);
                        _application.LeadStatusID = (int)enumLeadStatus.Printed;
                        ApplicationLeadService.Save(_application);
                    }
  
                    //RptApplication _applicationReport = new RptApplication((DealerLinkServer.SalesForceWebReference.SforceService)Session["SalesForceBinding"], args);
  
                    RptApplication _applicationReport = new RptApplication(id.ToString());
                    ReportProcessor _processor = new ReportProcessor();
                    RenderingResult result = _processor.RenderReport("PDF", _applicationReport, null);
                    string fileName = "NMotion_Lead_" + _application.ApplicantNameLast2First.Replace(" ", "_").Replace(",","_").Replace("'", "_") + "_" + _application.DateOfApplication.Year + _application.DateOfApplication.Month + _application.DateOfApplication.Day + ".pdf";
  
                    Response.Clear();
                    Response.ContentType = result.MimeType;
                    Response.Cache.SetCacheability(HttpCacheability.Private);
                    Response.Expires = -1;
                    Response.Buffer = true;
  
                    Response.AddHeader("Content-Disposition", string.Format("{0};FileName=\"{1}\"", "attachment", fileName));
                    Response.BinaryWrite(result.DocumentBytes);
                    Response.End();
  
                    break;
            }
        }

Thanks
Jonathan

Antonio Stoilkov
Telerik team
 answered on 03 Jan 2012
2 answers
81 views
Hi all,

I am using RadToolTipManager but it is not working on my page. I set html tips on the page, and call the RadToolTipManager control in the page as follows:

<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" />
<telerik:RadToolTipManager ID="RadToolTipManager_Tasks" 
    runat="server"
    Animation="FlyIn" /> 

But nothing is happening, when I was expecting to see the tooltips flying. 

Does RadToolTipManager needs the RadFormDecorator control?

Any thoughts?

Thanks,
Bruno
Svetlina Anati
Telerik team
 answered on 03 Jan 2012
4 answers
486 views
For testing purposes I have my session timeout set to 3 minutes.  2 minutes before session timeout the popup will appear.  If I click "Continue" it stays on the page and hides the dialog.  A minute later it will popup again as expected, but this time clicking the "Continue" button doesn't work at all.

I am not getting any javascript errors.  If I put an alert in the ContinueSession method I get there after the first click, but not after the second click.

Javascript Code:
<script language="javascript">
    //a flag to ease the logic which determines whether to redirect the user
    //will not redirect if the RadButton is clicked
    var toRedirect = true;
 
    function OnClientHiding(sender, args) {
        if (toRedirect) {
            window.location.href = sender.get_value();
        }
    }
    function ContinueSession() {
        var notification = $find("<%= rnSessionTimeout.ClientID %>");
        toRedirect = false;
        notification.update();
        notification.hide();
    }
    function OnClientShowing() {
        //raise the flaga again so that a redirect will occur if the notification autocloses
        toRedirect = true;
    }
</script>

HTML Code:
<telerik:RadNotification ID="rnSessionTimeout" runat="server" Position="Center" Width="300"
    Height="125" LoadContentOn="PageLoad" AutoCloseDelay="105000"
    Title="Session Expiration" TitleIcon="Warning" OnClientShowing="OnClientShowing"
    ContentIcon="Warning" Skin="Default" EnableRoundedCorners="true" OnClientHiding="OnClientHiding">
    <ContentTemplate>
        <p align="left">
            Your session is about to expire. Do you wish to continue using this site?<br />
            <telerik:RadButton Skin="Default" ID="continueSession" runat="server" Text="Continue Your Session" Style="margin-top: 10px;" OnClientClicked="ContinueSession" Autopostback="false" />
        </p>
    </ContentTemplate>
</telerik:RadNotification>

Code Behind:
Protected Sub rnSessionTimeout_CallbackUpdate(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadNotificationEventArgs) Handles rnSessionTimeout.CallbackUpdate
End Sub



Svetlina Anati
Telerik team
 answered on 03 Jan 2012
3 answers
112 views
Hi,
Could anyone please tell if it is possible to set the LoadingStatusPosition of a RadTreeView from client-side (using javascript)?

We want to keep the LoadingStatusPosition as 'BeforeNodeText' but in one case, we do not want it to show the loading on node expand and we want to achieve this on ClientContextMenuItemClicked (i.e. expand a node on OnClientContextMenuItemClicked with LoadingStatusPosition as none) .

Thanks & Regards,
Puneet
Dimitar Terziev
Telerik team
 answered on 03 Jan 2012
2 answers
103 views
Hello,

I am trying to implement the solution found on the following page:

http://www.telerik.com/support/kb/aspnet-ajax/menu/how-to-stretch-the-menu-items-to-fill-the-entire-width-of-the-menu.aspx

However, I am having problems accessing the RadMenu control client side using the following line

var menu = $find("<%= RadMenu1.ClientID %>");

Please can someone let me know why I struggle to access Telerik controls using this type of javascript command?

Also, does the code in the article above still in work in Q2 2011?

Full code for my solution is below:

<%@ Page Title="Home Page" Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <title></title>
</head>
<body onload="pageLoad()">
 
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        EnableTheming="True">
    </telerik:RadScriptManager>
 
    <telerik:RadMenu ID="RadMenu1" runat="server">
    </telerik:RadMenu>
 
    </form>
 
</body>
<script type="text/javascript">
    function pageLoad() {
        var menu = $find("<%= RadMenu1.ClientID %>");
    }
</script>
</html>

Thanks,

Ken
Ken Jones
Top achievements
Rank 1
 answered on 03 Jan 2012
2 answers
214 views
Hi 

i am using a multi column radcombo box.Html table is using in side Header Template and Item template.I want to give alternate row color for each rows in radcombo box.Please help.
This is my code

  <telerik:RadComboBox ID="rcbsList" EmptyMessage="List of addresses" runat="server"
                                Width="775px" CssClass="txtbox" Height="500px" HighlightTemplatedItems="True"
                                EnableLoadOnDemand="true" Skin="Office2007"  OnItemDataBound="rcbAddressList_ItemDataBound"
                                OnClientSelectedIndexChanged="onClientSelectedIndexChanged">
                                
                                <HeaderTemplate>
                                    <table style="width: 770px" cellspacing="0" cellpadding="0" border="0">
                                        <tr>
                                            <td style="width: 160px;">
                                                name
                                            </td>
                                            <td style="width: 100px;">
                                                address
                                            </td>
                                            <td style="width: 100px;">
                                            </td>
                                            <td style="width: 100px;">
                                            </td>
                                            <td style="width: 100px;">
                                                Town
                                            </td>
                                            <td style="width: 100px;">
                                                code
                                            </td>
                                            <td style="width: 100px;">
                                                Country
                                            </td>
                                        </tr>
                                    </table>
                                </HeaderTemplate>
                                <ExpandAnimation Duration="0" />
                                <ItemTemplate>
                                    <table id="tblRadCombo" style="width: 770px; height: 15px;" cellspacing="5" cellpadding="0"
                                        border="0">
                                        <tr>
                                            <td style="width: 160px;">
                                                <%# DataBinder.Eval(Container.DataItem, "Name")%>
                                            </td>
                                            <td style="width: 100px;">
                                                <%# DataBinder.Eval(Container.DataItem, "Address1")%>
                                            </td>
                                            <td style="width: 100px;">
                                                <%# DataBinder.Eval(Container.DataItem, "Address2")%>
                                            </td>
                                            <td style="width: 100px;">
                                                <%# DataBinder.Eval(Container.DataItem, "Address3")%>
                                            </td>
                                            <td style="width: 100px;">
                                                <%# DataBinder.Eval(Container.DataItem, "Code")%>
                                            </td>
                                            <td style="width: 100px;">
                                                <%# DataBinder.Eval(Container.DataItem, "Country")%>
                                            </td>
                                       
                                        </tr>
                                    </table>
                                </ItemTemplate>
                            </telerik:RadComboBox>


Thanks
Tiju
Tiju
Top achievements
Rank 1
 answered on 03 Jan 2012
3 answers
67 views
Hello,

I'd really like to change the image used while dragging a collapsed dock around.
I found the rdDragHelper selector in the help files..but nothing I've tried seems to change what/how the image behind the cursor is while dragging.

.rdDragHelper

{

opacity: .1 !important;

filter:alpha(opacity=10) !important; /* For IE8 and earlier */

}

Am I missing a selector..is this not configurable?

Thanks for your input.

Dan

Slav
Telerik team
 answered on 03 Jan 2012
7 answers
253 views
Hello

I've run into a strange issue with the RadAjaxLoadingPanel, whereby the panel appears correctly, but not the default loading icon.

I have basically created a version of the Wizard example in the Telerik demos:

http://demos.telerik.com/aspnet-ajax/tabstrip/examples/applicationscenarios/wizard/defaultcs.aspx

This issue also appears in this demo - whenever you are moving between the steps of the wizard, the loading panel does appear (the interface becomes faint), but no loading image.

Is this to do with that fact that the user controls are dynamically loaded, and/or the fact that IsSticky is set to true?

If I specify my own loading image, it does appear, though not in the centre of the loading panel where I would like it to be.

For the rest of my web app (not part of the wizard) I use the default loading image which works perfectly, so I was hoping to use the same for the wizard for consistency.

Any help would be greatly appreciated!

Alvin

Maria Ilieva
Telerik team
 answered on 03 Jan 2012
1 answer
79 views
Concerned,

By any chance, has anyone tried to upload a folder using upload control?

I'm sure that it would work with multiple selected files. But will this work when I select a folder?

I just came across of this link, that states this kind of feature is already in your TODO list of 2009, as we are currently in 2012, can i hope that it is already implemented?

Thanks for reading.
Kate
Telerik team
 answered on 03 Jan 2012
6 answers
66 views
Hi all 

I have a button in the form and when user click on the open button a new rad window open,after that user click on the close button on the top . after that the  form was closed after that when user click on  the open button again the two new rad window open after that if user select the another time then number of time the rad window open  again so please help me to short out this problem.
Sushobhit
Top achievements
Rank 2
 answered on 03 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?