Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
268 views
I've some files with long filename.
RadAsyncUpload does not load when fileName is grather than 158 characters.
Where I can change this?

this is my code
<body>
    <form id="form1" runat="server">
    <div>  <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="true"  LoadScriptsBeforeUI="true"
                                  EnablePartialRendering="true" />
   <telerik:RadAsyncUpload id="RadAsyncUpload1" runat="server" OnFileUploaded="RadAsyncUpload1_FileUploaded1" />
<asp:Button runat="server" ID="Button1" Text="Submit" OnClick="Button1_Click" />
    </div>
    </form>
</body>
</html>

I attach an image where show extended filename does not load it.

regards
Princy
Top achievements
Rank 2
 answered on 09 Aug 2013
4 answers
169 views
 Hello Community,

I am using the asyncUpload Control to upload a single file.

After the user selects their file I want to get the filename to show them their choice. Now the File is uploaded to the Temporary Folder and the File is renamed.

At the moment I can only get the FileName after the file is uploaded to the TargetFolder, but actually I need the Temporary FileName.

Is there any way to do that?

This is my function:

function OnClientFileSelected(sender, args) {
    var currentFileName = args.get_fileName();
    var fullPath = "C:/TempUpload/" + currentFileName;
    $("#LogoAuswahlPre").attr("href", fullPath);
    $('#LogoAuswahlPre').attr('data-lightbox', 'LogoAuswahl');
}

Thanks for reading

Daniel
Top achievements
Rank 1
 answered on 09 Aug 2013
3 answers
367 views
Hello,

I am using ASP.NET 3.5 with C#, telerik version 2012.1.515.35.

I have a RadTimepicker inside an UserControl.

I want to restrict entering of future time. Suppose I have 7:00 AM on my computer then user can select / insert maximum time 7:00 am, not more than that.

I also I need to show the RadTimepicker's time as per logged-in user's timezone. For that I am taking DateTime.UTCNow and converting it to user's time with some extension method.

The ascx page's RadTimepicker control's configuration is :

<telerik:RadTimePicker ID="rtpVitals" runat="server" Width="85" DateInput-DateFormat="HH:mm"
    TimeView-TimeFormat="HH:mm" Skin="Hay">
    <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x">
    </Calendar>
    <TimeView CellSpacing="-1" TimeFormat="HH:mm" OnClientTimeSelected="OnClientTimeSelected">
    </TimeView>
    <TimePopupButton CssClass="" ImageUrl="" HoverImageUrl="" onblur="hideTimePopup('rtpVitals');">
    </TimePopupButton>
    <DatePopupButton Visible="False" CssClass="" ImageUrl="" HoverImageUrl=""></DatePopupButton>
    <DateInput CssClass="txtbox txtBack-Color" BorderColor="#D0D1AE" BorderStyle="Solid"
        BorderWidth="1" ForeColor="#333333" onblur="enterDateTime();">
    </DateInput>
</telerik:RadTimePicker>


And in Page_PreRender() event of UserControl i call following method to set the RadTimePicker's property :

private void setTimePicker()
{
    try
    {
        TimeZoneInfo t = TimeZoneInfo.FindSystemTimeZoneById("Central Standard Time");
        DateTime d = DateTime.UtcNow.ToUserTime(t);
 
        rtpVitals.TimeView.StartTime = new TimeSpan(0, 0, 0);
 
        if (d.Hour < 1)
        {
            rtpVitals.TimeView.Interval = new TimeSpan(0, d.Minute/2, 0);
 
            if (d.Minute <= 1)
            {
                rtpVitals.TimeView.Interval = new TimeSpan(0, 0, d.Second/2);
            }
        }
        else if (d.Hour < 12)
        {
            rtpVitals.TimeView.Interval = new TimeSpan(0, 30, 0);
        }
        else
        {
            rtpVitals.TimeView.Interval = new TimeSpan(1, 00, 0);
        }
 
        rtpVitals.TimeView.EndTime = new TimeSpan(d.Hour, d.Minute, d.Second);
    }
    catch (Exception ex)
    {
        throw ex;
    }
}


The extension method to convert time is as below :

public static DateTime ToUserTime(this DateTime utcTime, TimeZoneInfo toUserTimeZone)
{
    try
    {
        utcTime = DateTime.SpecifyKind(utcTime, DateTimeKind.Unspecified);
        //Create the userTime object
        //Set it to UTC time by default. It would be changed later
        DateTime userTime = utcTime;
 
        //Convert the time
        TimeZoneInfo fromTimeZone = TimeZoneInfo.Utc;
        userTime = TimeZoneInfo.ConvertTime(utcTime, fromTimeZone, toUserTimeZone);
 
        //Return the TimeZone
        return userTime;
    }
    catch
    {
        throw;
    }
}


FYI : My computer's timezone is "(UTC+5:30) Chennai, Kolkata, Mumbai, New Delhi".

Set your PC's time between 8:30 AM to 10:30 AM, and run the project. The time-view will show you time upto 23:00 hours with 1 hour interval, but selection of any time will give you the error icon i.e. invalid time inside RadTimePicker.

You have any idea why it is happening?

Thanks..







Vasil
Telerik team
 answered on 09 Aug 2013
1 answer
306 views
Hey,
I have a code of a radComboBox which is bind to a table with only 2 columns : agentID & agentName.
I set up dataTextField to agentName, and dataValueField to agentID. 
The user can select in the comboBox the name of the agent, but when submitting the form the selectedValue returns null.

Any Ideas why ?

Thank you!
<telerik:RadComboBox ID="agentID_cmb" Runat="server" AutoPostBack="True"
                                    DataSourceID="SqlDataSource1" DataTextField="agentName" DataValueField="agentID"
                                    onselectedindexchanged="agentID_cmb_SelectedIndexChanged"
                                    ontextchanged="agentID_cmb_TextChanged" Skin="Office2007">
                                </telerik:RadComboBox>
                                <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                                    ConnectionString="<%$ ConnectionStrings:1122ConnectionString %>"
                                    SelectCommand="SELECT [agentID],[agentName] FROM [tblagents]"></asp:SqlDataSource>

Nencho
Telerik team
 answered on 09 Aug 2013
1 answer
307 views
Hi Telerik

I am using asyncupload control to upload client files. On selecting files and uploading the names will appear on the control. So at this point I have a requirement to open the uploaded file by clicking the filename or add a button such as "View File". Please provide your valuable support.

Thanks and Regards
Jane.
Shinu
Top achievements
Rank 2
 answered on 09 Aug 2013
1 answer
349 views

Hi Telerik,

I had RadEditor working till some time ago the client reported that some features don't work anymore and they get the message "The command <command name> is not implemented yet” .

I’ve tried the same sequence on the SharePoint server browser (IE7) and it works fine. I’ve tested on other servers browsers (even with different version, IE8) and it worked fine with all features.

I made tests with other hosts with different OS version and browser version (even with different browsers) and the result is the same, some features don’t work.

Many thanks

Luís Nuno Silva

Stanimir
Telerik team
 answered on 09 Aug 2013
4 answers
154 views
So here's the problem.  I can get the crossfade animation to work properly when I assign it to the page control ie.

<telerik:RadRotator id="RadRotator1" runat="server" SlideShowAnimation-Type="CrossFade"></telerik:RadRotator>

However when I build the control from code behind it will not allow me to apply the cross fade, or rather I can apply the cross fade but it works just like a standard fade.  Is there a work around or something that I can do to make sure the cross fade animation type gets applied when the control is built from code behind.

Below is what I am doing:

public RadRotator GenerateRotatingBanner(SiteBanner banner)
    {
        RadRotator thisRotator = new RadRotator();
 
        thisRotator.Width = Unit.Pixel(banner.BannerWidth);
        thisRotator.ItemWidth = Unit.Pixel(banner.ImageWidth);
        thisRotator.Height = Unit.Pixel(banner.BannerHeight);
        thisRotator.ItemHeight = Unit.Pixel(banner.ImageHeight);
        thisRotator.ScrollDuration = Convert.ToInt32(banner.TransitionTime * 1000);
        thisRotator.FrameDuration = Convert.ToInt32(banner.FrameDelay * 1000);
        thisRotator.PauseOnMouseOver = false;
        thisRotator.ItemTemplate = new RotatorTemplate();
        thisRotator.WrapFrames = banner.RotatingFrameWrap;
        thisRotator.OnClientItemClicked += "OnClientItemClicked";
        thisRotator.OnClientItemShowing += "ClientItemShowing";
 
        switch (banner.RotationType.ToLower())
        {
            case "business card":
                thisRotator.RotatorType = RotatorType.AutomaticAdvance;
                switch (banner.Direction.ToLower())
                {
                    case "up":
                        thisRotator.ScrollDirection = RotatorScrollDirection.Up;
                        break;
                    case "down":
                        thisRotator.ScrollDirection = RotatorScrollDirection.Down;
                        break;
                    case "left":
                        thisRotator.ScrollDirection = RotatorScrollDirection.Left;
                        break;
                    case "right":
                        thisRotator.ScrollDirection = RotatorScrollDirection.Right;
                        break;
                    default:
                        thisRotator.ScrollDirection = RotatorScrollDirection.Left;
                        break;
                }
                break;
            case "carousel":
                thisRotator.RotatorType = RotatorType.Carousel;
                break;
            case "cover flow":
                thisRotator.RotatorType = RotatorType.CoverFlow;
                switch (banner.Direction.ToLower())
                {
                    case "up":
                        thisRotator.ScrollDirection = RotatorScrollDirection.Up;
                        break;
                    case "down":
                        thisRotator.ScrollDirection = RotatorScrollDirection.Down;
                        break;
                    case "left":
                        thisRotator.ScrollDirection = RotatorScrollDirection.Left;
                        break;
                    case "right":
                        thisRotator.ScrollDirection = RotatorScrollDirection.Right;
                        break;
                    default:
                        thisRotator.ScrollDirection = RotatorScrollDirection.Left;
                        break;
                }
                break;
            case "slide show":
                thisRotator.RotatorType = RotatorType.SlideShow;
                thisRotator.SlideShowAnimation.Duration = Convert.ToInt32(banner.TransitionTime * 1000);
                thisRotator.SlideShowAnimation.Type = Telerik.Web.UI.Rotator.AnimationType.CrossFade;
                break;
            default:
                thisRotator.RotatorType = RotatorType.AutomaticAdvance;
                switch (banner.Direction.ToLower())
                {
                    case "up":
                        thisRotator.ScrollDirection = RotatorScrollDirection.Up;
                        break;
                    case "down":
                        thisRotator.ScrollDirection = RotatorScrollDirection.Down;
                        break;
                    case "left":
                        thisRotator.ScrollDirection = RotatorScrollDirection.Left;
                        break;
                    case "right":
                        thisRotator.ScrollDirection = RotatorScrollDirection.Right;
                        break;
                    default:
                        thisRotator.ScrollDirection = RotatorScrollDirection.Left;
                        break;
                }
                break;
        }
 
        return thisRotator;
    }
Colton3310
Top achievements
Rank 1
 answered on 09 Aug 2013
0 answers
82 views
radschedular problem of multiple resources
Kalpna
Top achievements
Rank 1
 asked on 09 Aug 2013
4 answers
411 views
AsyncUpload is really come in handy, however I have a question which I don't know how to deal with:

I have a page with AsyncUpload control and other normal text fields for user to update/insert a article with attachment, and I only want to save file after user click 'Save' button (so not only for saving file but other text fields as well), however the attachment is uploaded asynchronously, so a file is uploaded before user click 'Save' button, so my questions is how to remove the file if user decide not to save page or even close browser ?

Many thanks!
Shinu
Top achievements
Rank 2
 answered on 09 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?