Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
156 views
Please help me, I have no idea how to upload the images form local computer to the remote computer's folder. I don't know how to write the code about the remote folder' path   on "TargetFolder" and how to test it whether it uploaded correctly. Please give me an example. Thanks very much!
<telerik:RadAsyncUpload RenderMode="Lightweight" runat="server" ID="AsyncUpload1" AllowedFileExtensions="jpeg,jpg,gif,png,bmp" OnClientFileUploading="OnClientFileUploading" OnClientValidationFailed="onClientValidationFailed"  MaxFileInputsCount="1" 
TargetFolder="" > 
</telerik:RadAsyncUpload>

Colin
Top achievements
Rank 1
Iron
 asked on 22 Mar 2023
0 answers
134 views

I have the following scenario: after a postback

RadCombobox with enabled=False breaks AXD code like attached sceenshot. No Telerik components are working anymore. I am 100% sure this was working before the update.

When I set the RadCombobox the to enabled=True everything works fine.

Please advise...

 

Marc

Fit2Page
Top achievements
Rank 2
Bronze
Iron
Iron
 asked on 22 Mar 2023
0 answers
173 views

Good morning,

I have link button in my aspx file:

<asp:LinkButton ID="LinkButton1" Font-Size="X-Small" TabIndex="-1"
                                                                            Height="25px" Width="90px" Visible="false" BorderColor="WhiteSmoke" BackColor="#5A8EC1" BorderStyle="Solid" ForeColor="White" OnClientClick="approveConfirm();return false;"  runat="server" Font-Names="Verdana">APPROVE</asp:LinkButton>

Below is approveConfirm() function:

                  

 

    <script type="text/javascript">


        function approveConfirm() {

            if (radconfirm("Are you sure you want to Approve and ready to proceed?", callbackFn2, 400, 200, null)) {
                return false;
            }
            else {
                return true;
            }

        }
        function callbackFn2(arg) {

            var ajaxManager = $find("<%=RadAjaxManager1.ClientID%>");
            if (arg) {
                ajaxManager.ajaxRequest('okApprove');
            }
            else {
                ajaxManager.ajaxRequest('notApprove');
            }

 

For some reason when Linkbutton is disabled, and I still was able to click on this button and confirm popup message appeared. I need only to appeared confirm popup message when button is enabled.

Thanks so much for your help.

Vitaly
Top achievements
Rank 1
Iron
Iron
 asked on 21 Mar 2023
1 answer
123 views

When I use RadImageEditor / Tools / CommandName / CustomSave the image is saved without the dialog box...

What if I want to export the image "CommandName="Export" without the "Save Image on Server" dialog appearing?
Only "Download Image" is displayed....
See picture....

 

Attila Antal
Telerik team
 answered on 21 Mar 2023
1 answer
288 views

Hi Telerik,

In my ASP.Net web application, I am using a RadEditor tool to manage notes and documents.

While I went through the Hyperlink Manager option on radeditor, I was able to add the document url to the Hyperlink Manager URL text box by opening the Document Manager. It’s working fine here.

But, the document url showing the physical path of the selected document, that means it’s not much secure.


Please see the screenshot.

So, we need to encrypt the same url and replace the Hyperlink manager URL text box text with the encrypted url when I upload a file from the document manager.

Since the hyperlink Manager is an inbuilt functionality of the RadEditor, how could I access the url text box to get the text and replace the same with encrypted url at the same time when adding an attachment from the document manager.


How could I achieve the same.

Thanks & regards,


Attila Antal
Telerik team
 answered on 21 Mar 2023
1 answer
187 views

Hi !

How to use the EnableLoadOnDemand on radcombobox with item template ?

because i've got many Data (over 3000), change with agencyID and for not reload and make object, set on viewstate.

How to user this with filter contains ? because itemsRequested add only radcomboboxitem to radcomboboxitems.

 EnableLoadOnDemand="true" ItemsPerRequest="100" EnableVirtualScrolling="true"

Actually, my sample (Aspx) :

<telerik:RadComboBox RenderMode="Lightweight" Skin="Material" ID="rcbNomEntreprise" runat="server" EmptyMessage="Entreprise / Siren" CssClass="rcb" AutoPostBack="true" Filter="Contains" Width="100%" MaxHeight="400px" Culture="fr-FR" DropDownCssClass="rcbSP2 rcbFiltreContent FiltreNavOperation">
	<ItemTemplate>
		<div class="rcbEntreprise">
			<div class="entreprise-nom gcs">
				<%# Eval("NomEntreprise") %>
            </div>
            <div class="entreprise-siren gcs" >
				Siren : <%# Eval("Siren") %>
            </div>
            <address>
				<%# Eval("Adresse") %>
            </address>
            <div class="cpCommune"> <%# Eval("CPetCommune") %></div>
            <%# If(DirectCast(Eval("IsAutoriseCompta"), Boolean) = True, String.Empty, "<div class=""gcs bloqueCompta"">cette entreprise n'est pas autorisée pour les nouveaux marchés.</div>") %> 
        </div>
    </ItemTemplate>
</telerik:RadComboBox>

Vb for binding :


    Private Property EntreprisesAgence As List(Of RechercheEntreprise)
        Get
            Return ViewState("entreprisesAgence")
        End Get
        Set(value As List(Of RechercheEntreprise))
            ViewState("entreprisesAgence") = value
        End Set
    End Property

In Load :

If EntreprisesAgence Is Nothing Then InitEntreprise() ' Get SQL data to Object, to Viewstate

            With rcbNomEntreprise
                .DataSource = EntreprisesAgence
                .DataTextField = "Complet"
                .DataValueField = "identreprise"
                .DataBind()
            End With
Thanks.

 

 

Attila Antal
Telerik team
 answered on 20 Mar 2023
1 answer
103 views

Hello,

I am facing an issue when uploading to AWS S3, which is automatic renaming of the uploaded file 

original file name is BD-september-2022-quarter.csv

and the new file name is : 03fb8435-90ea-4378-a602-925d37db8277_BD-september-2022-quarter.csv

i don't know why after upload the original filename is not being kept
 

<telerik:RadCloudUpload ID="RadCloudUpload1" runat="server" RenderMode="Lightweight" MultipleFileSelection="Automatic" OnClientFileUploading="OnClientFileUploading" AllowedFileExtensions=".csv" ProviderType="Amazon" localization-SelectButtonText="Browse to Upload ..." MaxFileSize="3145728" OnFileUploaded="RadCloudUpload1_FileUploaded"/>

Thanks for your help
Attila Antal
Telerik team
 answered on 20 Mar 2023
2 answers
103 views

Hello

I have a ASP.NET AJAX site which lets you generate bills. These have a header and lines.

It does have a button to generate a PDF report of this bill.

The form is a RadDataForm, always in edit mode, and inside of it, besides header fields, it's a RadGrid for the bill lines .

Until now, you have to first click the built in save button in the RadDataForm, then you can click on the generate PDF, otherwise the PDF is outdated (it doesn't save the modified header and lines). Now it's required that only clicking on the generate PDF button first save everything in the radDataForm, then it generates the PDF with updated values. I managed to save the header data before executing the PDF code but I can't figure out how to save the lines (RadGrid), because if I trigger it, then stops executing and the PDF report isn't generated at all.

The Save button has a client side Javascript event attached to save the RadGrid status.

 var grid1 = $telerik.findControl(document.documentElement, "RadGrid1");
var batchManager1 = grid1.get_batchEditingManager();
var hasChanges = batchManager1.hasChanges(grid1.get_masterTableView());
if (hasChanges) {
  batchManager1.saveTableChanges([grid1.get_masterTableView()]);
  ajaxPanel.ajaxRequest("saveChanges");

} else {
  var ajaxPanel = $telerik.findControl(document.documentElement, "RadAjaxPanel1");
  ajaxPanel.ajaxRequest("saveChanges");
}

If I add that same client side function in the generate PDF, it saves the RadGrid but it doesn't execute the generate PDF code (possibly due to the Postback preventing it to reach the server side function that generates the report and PDF)

 

I use the BatchEditCommand to manually get the updated, inserted or deleted rows and execute the SQL queries to do that. But I can't get the list of commands (the GridBatchEditingEventArgs e) without this event

Is there a way to save the radDataForm first (including the RadGrid) then generating the PDF file (it's a server side function)

Many thanks!

Christian
Top achievements
Rank 1
Iron
 updated answer on 20 Mar 2023
0 answers
91 views

I have to change the value of a raddateinput server side.

On client side I have an Ajax function than show the age.

What I have to use on server-side and on client-side to fie event?

For example this doesn't works:

server side:

RdMyDateInput.SelectedDate = DateTime.Parse(MyStringDate);

client side:

<telerik:RadDateInput ID="RdNyDateInput" runat="server" ClientEvents-OnValueChanged="AgeCount" Culture="it-IT" MaxDate="2999-12-31" MinDate="1900-01-01" Skin="Silk">
                 <ClientEvents OnValueChanged ="AgeCount"></ClientEvents>
</telerik:RadDateInput>

the event fires only on web page, not by server side.

Thanks

Renati

RRE
Top achievements
Rank 2
Iron
 asked on 17 Mar 2023
0 answers
196 views

Hi Telerik,

 

I want to trigger the Document manager insert button event when I inserting an attachments into the hyperlink manager when I open the document manager from the hyperlink manager.

 

I tried by adding the below code based on the documentation, 

Added OnClientPasteHtml event for RadEditor

<telerik:RadEditor ID="reNotes" runat="server" Width="800" Height="300" Skin="Windows7" 
                                OnClientLoad="OnClientLoad" EnableResize="False" AutoResizeHeight="true" EditModes="Design"
                                OnClientCommandExecuting="OnClientCommandExecuting" OnClientPasteHtml="OnClientPasteHtml" >
                                <DocumentManager MaxUploadFileSize="20000000" SearchPatterns="*.*" />
                                <Content>                                     
                                
                                </Content>
                            </telerik:RadEditor>
Also added the corresponding function in the script
 function OnClientPasteHtml(sender, args) {
                    alert(10);
                    debugger;
                    var commandName = args.get_commandName();
                    var value = args.get_value();

                    if (commandName == "Paste") {
                        // The StripPathsFilter() method receives as a parameter an array of strings (devided by a white space) that will be stripped from the absolute links.
                        var domainName = "http://" + window.location.host; //returns the hostname and port number of the current URL
                        var filter = new Telerik.Web.UI.Editor.StripPathsFilter([domainName]); //strip the domain name from the absolute path

                        var contentElement = document.createElement("SPAN");
                        //contentElement.innerHTML = value;
                        var newElement = filter.getHtmlContent(contentElement);
                        alert(newElement.outerHTML);
                        //args.set_value(newElement.outerHTML);  //set the modified pasted content in the editor
                    }
                }

But the event not triggering when the insert button clicked.

 

Please note : I opened the document manager from the hyperlink manager popup.

Please see the screenshot

 

Is there any way to trigger the insert button event, So that I can access the current attachment url and replace the same with an encrypted url and also display the encrypted URL in the url field of the hyperlink manager.

 

Thanks & regards,


jamsheer
Top achievements
Rank 1
Veteran
 updated question on 17 Mar 2023
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?