Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
305 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
202 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
122 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
113 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
98 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
210 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
1 answer
162 views

Within a page, I have the following - 

<telerik:RadGrid ...

     <telerik:GridAttachmentColumn ... AllowedFileExtensions=".png,.gif,.jpg,.jpeg" ... />

</ telerik:RadGrid>

When editing an item within the grid, and clicking the 'Select' option on the grid's edit column related to the GridAttachmentColumn, I'm receiving this popup - 

 

I want to restrict the files a user can select to upload through this dialog to those defined within the 'AllowedFileExtensions' property of the control, either from within the HTML, or in the code behind.

How can I go about doing that? If this is not the correct place to be asking this question, where on the forum should I be asking this question?

Thanks.

Attila Antal
Telerik team
 answered on 16 Mar 2023
2 answers
485 views

How to un-highlight filtered yellow records. I used Ctrl+F to search keywords, those matching records were highlighed in yellow. Now I want to remove the highlighted(yellow) recorded. 

 

Jared
Top achievements
Rank 1
Iron
 answered on 15 Mar 2023
0 answers
136 views

I'd like to dynamically increase the grid size (add rows and or columns) when a user attempts to paste data that exceeds the default size.

Is there an event that I can capture that fires before the 'Cannot paste, because the copy area and the paste area are not the same size and shape' error occurs?

I've tried OnClientChanging and OnClientPaste but the error is thrown before either of these events fire.

John
Top achievements
Rank 1
Iron
 asked on 15 Mar 2023
14 answers
1.3K+ views

I have a Radgrid on ASP.NET Form (RadControls for ASP.NET AJAX Q2 2012 SP2 with VS 2010) , which is bound to a Linq data source and set it to have 10 records per page , sorting, filtering is enabled. Also have a hyper a link column (Radgrid Mastertable Databound column) on the Radgrid, such that a user can click it & navigate to another external page (details.aspx) from the list.  I am passing Master Table Primary Key that is Parent key of all rows in Detail Page. On the details page, they have "Back" button to return to the RadGrid page.

I am looking for sample code snippet on the Server/Client Side on how to specify the page/row index to set the RadGrid after data binding. The idea is to ensure the user navigates to the same Radgrid (Parent) page/row index they were originally on after exiting from details.aspx.

Thanks

gc_0620

Rumen
Telerik team
 updated answer on 15 Mar 2023
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?