Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
85 views
Telerik:
If you are monitoring this forum and theres a better way, please let me know...

When uploading an image and overwriting the old file with the same filename, and you find that the file displayed on the upload page is not refreshing, you may find this solution useful.

You may get that for 2 reasons:
1. The upload filename is the same as the previous so the browser does not refresh the image
2. The file extension changes but the page still displays the old image

The code below does 2 additional things (compared to telerik sample code)
1. It re-sets the image path after uploading (with file ext that may have changed)
2. It adds a unique query string to the end of the image source to force browser refresh

      

       function BannerUploaded(sender, args) {
            var ajaxmgr = $find("<%= RadAjaxManager1.ClientID %>");
            var upload = $find("<%= RadAsyncUploadBannerImage.ClientID %>");
            var Extension;
            ajaxmgr.ajaxRequest("client1");
            $telerik.$(".invalid").html("");
            //Get the uploaded file ext in case the ext is different (different filename)
             var inputs = upload.getUploadedFiles();
            for (i = inputs.length - 1; i >= 0;i--) {Extension=getFileExtension(inputs[i]);}
         
            setTimeout(function () {
            sender.deleteFileInputAt(0);
            var mySrc = document.getElementById('<%= thumbnailBanner.ClientID %>').src;
            var FileWOExt=removeFileExtension(mySrc);
            document.getElementById('<%= thumbnailBanner.ClientID %>').src=FileWOExt + '.' + Extension + "?" + new Date().getTime();}, 400);
        }
 
        function validationFailedBanner(sender, args) {
 
            $telerik.$(".invalid")
            .html("Please choose a valid image file");
            sender.deleteFileInputAt(0);
        }
 
        function getFileExtension(filename) {
            return filename.split('.').pop();
        }
         
        function removeFileExtension(filename) {
         
        return filename.substr(0, filename.lastIndexOf('.'));
}

 

 

 

Dimitar Terziev
Telerik team
 answered on 11 Jan 2012
2 answers
381 views
Hi ,

We are using a RadListView with 2 column , we want to implement a drag drop reorder items of the List View .On reorder we want to save the positions of the list items. We found the drag drop items functionality of this List view but could not get the reorder functionality. We are stuck in this please help us  .


Thanks,
Antonio Stoilkov
Telerik team
 answered on 11 Jan 2012
1 answer
165 views
Hi,

I want to set the grid column width in javascript, during Grid Created event.

Can anyone help me reagrding this?

Thanks,
Anoop.
James Campbell
Top achievements
Rank 1
 answered on 11 Jan 2012
1 answer
66 views
Hi,
  We have a RadGrid with ExportToPDF function inside a UserControl, this generally works great, however, we just found out the exporting function failed to work when the user control is linked to the  RadToolTipManager: More spcifically when using RadToolTipManager to dynamically load the user control through OnAjaxUpdate function, the exporttopdf failed to work in the user control-- the RadGid updates itself instead of triggering a popup. Understanding the ExportToPDF doesn't work in the Ajaxify interfaces, I tried to add some java scripts to disable ajax, but the script failed to execute and the problem persists. The ExportToPDF function works fine if taking out the RadToolTipManager control and the user control is within a regular page.
  Do anyone have any insight the impact of RadToolTipManager on the exporting function?

  Thanks,
  David
Marin Bratanov
Telerik team
 answered on 11 Jan 2012
5 answers
166 views
How do I avoid this?
Currently if get appointments fails, it keeps retrying for some reason.
towpse
Top achievements
Rank 2
 answered on 11 Jan 2012
4 answers
91 views
My requirement is to load only certain item initially and load on every pagination like radgrid Ajax previous or next event. I don't see any example. All load on demand is through webservice which I am trying to avoid. I have datatable bind for the rotator and trying to load only few items and then load on every request. Is it possible?
Vijaianand
Top achievements
Rank 1
 answered on 11 Jan 2012
3 answers
234 views

We are developing ASP.NET application using Telerik contorls. Right now we have developed sample application screen as in attached image.

As in attached image notification.png, my requirement is to have all application alerts show in header control.
For example :IR Actions : (3) is a notification text. When user hower the cursor we get the tooltip as in attached image. We want text ‘IR Actions : (3) should be bliniking. 

We have implemented all these using few custom CSS/Images and code behind.
However I would like to have Telerik controls and wanted to achive this functaionlty. How can achive these notifications buttons (with size of the tooltip can be contolled dynamically, blink/no blink from code behind, and pass the text like ‘IR Actions : (3)’ comes from code behind).

Can you please send me sample application code which will meets my above requirement ?

Thanks
Ramana

Princy
Top achievements
Rank 2
 answered on 11 Jan 2012
1 answer
103 views
When I load up the page and apply the appropriate mask to the textbox the data is displayed correctly.
If I then click another page and then use the browser's back button, the phone number is messed up and missing the last 4 digits while the other  6 are in random places within the mask?
<telerik:RadMaskedTextBox  ID="txtPhone" runat="server" Width="225px" MaxLength="10" DisplayMask="(###)###-####" Mask="##########" SelectionOnFocus="CaretToBeginning" />

The issue is in IE 8. We are using 2010.3.1317.35. The control is not wrapped in any AJAX.
Tsvetina
Telerik team
 answered on 11 Jan 2012
1 answer
108 views
Hello group member,
                                 I have form with rad editor,After entering data at the end when the user click's "Submit" button then I need to find number of paragraphs  existed in rad editor .Can any one help me how to do this. 
Rumen
Telerik team
 answered on 11 Jan 2012
3 answers
219 views
Hello Group Members,
                                  I have rad editor,When I type words in rad editor it shows total number of words and characters at the bottom of Rad Editor. Can any one tell me which function should I use to  get the values of Word and Characters from Rad Editor.
Rumen
Telerik team
 answered on 11 Jan 2012
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?