Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
105 views

Hi,

I have an HTML form and a RadGrid configured on a page. RadGrid's events and all the properties are dynamically built on the server side. RadGrid has an ExportToExcel toolbar command and works as it is. The issue is when I click the ExportToExcel toolbar button, It downloads the Excel file. When I click the HTML form's Save button, which means input type submit button, Radgrid downloads the Excel file again. If I click a different Radgrid toolbar command and then click the Form submit button, Radgrid will trigger its previous toolbar event.

Thanks

Vasko
Telerik team
 answered on 31 May 2024
1 answer
134 views
Hello, please consider to add scenario when MultiColumnComboBox is used as RadGrid column filter
Rumen
Telerik team
 answered on 28 May 2024
1 answer
264 views

Hi,

I'm testing the PDF Signature demo shown in this Telerik example PDF Signature demo. The issue I'm having is I cannot pull a pdf that resides on a network file server where we store all common files. I have no issues loading a pdf on my localhost machine. 

From what I can tell, the issue appears to be the third party opensource pdf.js file Telerik is using in demo that seems confined to only load pdf's from directories within the web application and it's sub-folders defined in IIS for the website. Also, the network file server is used everywhere within our web application so it's not a security issue. 

The error I get from pdf.js is "Not allowed to load local resource" which results in page prompt "PDF file fails to process." display. 

We have an existing web.config entry that looks like this:

<add key="AttachmentsShare" value="\\my_file_server\file"/>

I've tried calling the file server a few different ways with no luck.

RadPdfViewer1.PdfjsProcessingSettings.File = ConfigurationManager.AppSettings("AttachmentsShare") & "1234.pdf"

RadPdfViewer1.PdfjsProcessingSettings.FileSettings.Url = ConfigurationManager.AppSettings("AttachmentsShare") & "1234.pdf"

Please advise. Thanks. 

Disposable Hero
Top achievements
Rank 1
Iron
 answered on 24 May 2024
1 answer
145 views

I am attempting to show a 'tooltip'-like window/div on the RadGrid Columns context menu panel that slides out when you hover over 'Columns'. 

The div is shown on the 'mouseenter' event, and then removed on the 'mouseout' event.  The issue I'm experiencing is that the 'Columns' context menu will hide itself shortly after the 'tooltip' div is shown, thus causing the window to immediately be removed from the DOM. 

Is there a more effective way to produce this kind of behavior?  Additionally, I'm targeting the 'li.rmitem.rmtemplate' class, and I'm also wondering if that is the most appropriate one?

In this code snippet from the ClientEvents OnGridCreated event, I'm populating the 'tooltip' div with the column heading, but it will eventually be replaced with dynamic data based upon which column heading is hovered over.


let columnSlideOutItems = document.querySelectorAll('li.rmitem.rmtemplate');

columnSlideOutItems.forEach(function (c) {
	let thisNode = c.childNodes[0];
	let tooltip = document.createElement('div');
	tooltip.style.position = 'absolute';
	tooltip.style.backgroundColor = '#fff';
	tooltip.style.border = '1px solid #000';
	tooltip.style.padding = '10px';

	tooltip.innerHTML = thisNode.innerText;
	document.body.appendChild(tooltip2);

	thisNode.addEventListener('mouseenter', function (e) { 
		console.log(this.innerText);
		tooltip.style.left = e.pageX + 'px';
		tooltip.style.top = (e.pageY - 22) + 'px';
		tooltip.style.zIndex = 99999;
	});

	thisNode.addEventListener('mouseout', function (e) {
	    if (tooltip) tooltip.remove();
	});
});

 

 

 

 

Vasko
Telerik team
 answered on 22 May 2024
1 answer
140 views

Hello Telerik crew,

After the recent Chrome update (vers 125.0.6422.61), I am encountering strange behavior when opening a custom dialog from within a RadEditor control. I have not experienced the below issue in Firefox nor Edge, only latest version of Chrome.

If plain text is selected (i.e.: no html formatting), the custom dialog is launched and the text loses it's focus which in-turn causes a hyperlink to be pasted directly after the text I had selected. If an A tag is selected, the custom dialog is launched and the selected A tag doesn't lose focus.

I have included the code I am using to launch the custom dialog:

            Telerik.Web.UI.Editor.CommandList["InsertHyperlink_FWText"] = function (commandName, editor, args) {
                // only continue if we have actual text selected in <textarea>
                var selected_text = editor.getSelection().getText();
                if (selected_text != "" || editor.getSelectedElement().tagName == "A") {
                    var elem = editor.getSelectedElement(); //returns the selected element.
                    var flag = true;
                    var parent_elem = elem.parentElement;
                    if (elem.tagName == "A") {
                        if (elem.getAttribute('class') == "advbutton") {
                            flag = false;
                        }
                        editor.selectElement(elem);
                        argument = elem;
                    } else {
                        do { //set up the parent element and find the encapsulating A tag
                            parent_elem = parent_elem.parentElement;
                            if (parent_elem == null) { break; }
                        } while (parent_elem.tagName != "A");
                    
                        if (parent_elem != null) {
                            if (parent_elem.tagName == "A") {
                                if (parent_elem.getAttribute('class') == "advbutton") {
                                    flag = false;
                                }
                                selected_text = parent_elem.innerHTML;
                                editor.selectElement(parent_elem);
                                argument = parent_elem;
                            }
                        } else {
                            //remove links if present from the current selection - because of JS error thrown in IE
                            editor.fire("Unlink");
                            //remove Unlink command from the undo/redo list
                            var commandsManager = editor.get_commandsManager();
                            var commandIndex = commandsManager.getCommandsToUndo().length - 1;
                            commandsManager.removeCommandAt(commandIndex);
                            //
                            var content = editor.getSelectionHtml();
                            var link = editor.get_document().createElement("A");
                            link.innerHTML = content;
                            argument = link;
                        }
                    }

                    // only if dealing with a hyperlink advanced button, do we continue
                    if (flag == true) {
                        //---------------- Classic ASP Hyperlink Editor ---------------------------------------------
                        var doChooseLink = function (elem) {
                            var objEl = new Object();
                            if (elem.getAttribute("href") != null) {
                                objEl.href = elem.getAttribute("href");
                                objEl.target = elem.getAttribute("target");
                                objEl.title = elem.getAttribute("title");
                            } else {
                                objEl.href = ""
                                objEl.target = ""
                                objEl.title = ""
                            }
                            var args = new Array();
                            args["objEl"] = objEl;
                            args["Mode"] = "doclink"
                            flexDialog(620, 410, "/fw/_theditor/ed_links.asp", args, doChooseLink_CallBack, null);
                        }

                        var doChooseLink_CallBack = function (retValue, objEl) {
                            if (retValue.href == "") {
                                editor.pasteHtml(String.format(selected_text));
                            } else {
                                if (selected_text.charAt(selected_text.length - 1) == ' ') {
                                    selected_text = selected_text.substring(0, selected_text.length - 1);
                                    editor.pasteHtml(String.format("<a href='{0}' title='{1}' target='{2}'>" + selected_text + "</a> ", retValue.href, retValue.title, retValue.target));
                                } else {
                                    editor.pasteHtml(String.format("<a href='{0}' title='{1}' target='{2}'>" + selected_text + "</a>", retValue.href, retValue.title, retValue.target));
                                }
                            }
                        }

                        doChooseLink(argument);
                        //---------------- END Classic ASP Hyperlink Editor ---------------------------------------------
                    }
                }
            };

Please let me know if you need any other information, or a clearer explanation of the issue I am experiencing in Chrome (vers.125) only).

Thank you!

Rumen
Telerik team
 answered on 21 May 2024
1 answer
587 views

We are using the below .dlls as standalone .dlls (Not from Nuget package installation) In a .Net Framework Web Forms Application

We want to migrate/upgrade to .Net framework 4.8

Are these Dlls backwards compatible or should i use new versions of these dlls that will be compatible with .Net Framework 4.8?

  • Telerik.Web.Design, Version=2013.2.717.40
  • Telerik.Web.UI, Version=2013.2.717.40
  • Telerik.Web.UI.Skins, Version=2013.2.717.40

Thanks!

Rumen
Telerik team
 answered on 21 May 2024
1 answer
120 views

Hello
I have several separate report pages in ASP.NET, for example :

Report 1.cs

Report 2.cs,

Report 3.cs

And when I get a report, I want these 3 reports to be seen in 3 pages and consecutively and displayed consecutively in the output file like PDF.
Thank you for guiding me.

Rumen
Telerik team
 answered on 13 May 2024
2 answers
152 views

I know I should create separate questions, but these are all so minor it doesn't seem worthwhile.

  1. Is there a way to prevent the annoying pop-up when the spellcheck is complete? Or if there needs to be one couldn't a RadAlert be used instead of the default browser dialog? At least the look would be more consistent.
  2. Are there parameters that can be used to determine how spellcheck handles capitalization? For instance it thinks "THe" is correct because it's not checking capitalization
  3. How can I increase the width of the pop-up window? I changed the font and now the pop-up is too narrow and the text wraps. It appears the width is set on the element so that was overriding anything I tried to change in the classes being used.

Rumen
Telerik team
 answered on 08 May 2024
1 answer
152 views

When try upload file/image i got error "check image"


        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />

<telerik:RadEditor ID="RadEditor1" runat="server" SkinID="BasicSetOfTools" Height="500px" ContentFilters="DefaultFilters,PdfExportFilter" ContentAreaMode="Div" NewLineMode="Br, P" ExternalDialogsPath="~/EditorDialogs" EnableResize="False"><ExportSettings OpenInNewWindow="True"></ExportSettings><Tools><telerik:EditorToolGroup Tag="MainToolbar"><telerik:EditorTool Name="XhtmlValidator" /><telerik:EditorTool Name="PageProperties" /><telerik:EditorTool Name="StyleBuilder" /><telerik:EditorTool Name="TrackChangesDialog" /><telerik:EditorTool Name="FormatCodeBlock" /><telerik:EditorSeparator /><telerik:EditorTool Name="InsertImage" /><telerik:EditorTool Name="InsertLink" /><telerik:EditorTool Name="InsertTableLight" /><telerik:EditorSeparator /><telerik:EditorToolStrip Name="InsertFormElement"></telerik:EditorToolStrip><telerik:EditorTool Name="InsertFormForm" /><telerik:EditorTool Name="InsertFormButton" /><telerik:EditorTool Name="InsertFormCheckbox" /><telerik:EditorTool Name="InsertFormHidden" /><telerik:EditorTool Name="InsertFormPassword" /><telerik:EditorTool Name="InsertFormRadio" /><telerik:EditorTool Name="InsertFormReset" /><telerik:EditorTool Name="InsertFormSelect" /><telerik:EditorTool Name="InsertFormSubmit" /><telerik:EditorTool Name="InsertFormTextarea" /><telerik:EditorTool Name="InsertFormText" /><telerik:EditorSeparator /><telerik:EditorTool Name="StripAll" /><telerik:EditorTool Name="StripCss" /><telerik:EditorTool Name="StripFont" /><telerik:EditorTool Name="StripSpan" /><telerik:EditorTool Name="StripWord" /></telerik:EditorToolGroup><telerik:EditorToolGroup Tag="InsertToolbar"><telerik:EditorTool Name="ImageManager" ShortCut="CTRL+M" /><telerik:EditorTool Name="ImageMapDialog" /><telerik:EditorSeparator /><telerik:EditorTool Name="FlashManager" /><telerik:EditorTool Name="MediaManager" /><telerik:EditorTool Name="InsertExternalVideo" /><telerik:EditorSeparator /><telerik:EditorTool Name="DocumentManager" /><telerik:EditorTool Name="TemplateManager" /><telerik:EditorSeparator /><telerik:EditorToolStrip Name="InsertTable"></telerik:EditorToolStrip><telerik:EditorTool Name="InsertRowAbove" /><telerik:EditorTool Name="InsertRowBelow" /><telerik:EditorTool Name="DeleteRow" /><telerik:EditorTool Name="InsertColumnLeft" /><telerik:EditorTool Name="InsertColumnRight" /><telerik:EditorTool Name="DeleteColumn" /><telerik:EditorSeparator /><telerik:EditorTool Name="MergeColumns" /><telerik:EditorTool Name="MergeRows" /><telerik:EditorSeparator /><telerik:EditorTool Name="SplitCellHorizontal" /><telerik:EditorTool Name="SplitCell" /><telerik:EditorTool Name="DeleteCell" /><telerik:EditorTool Name="SetCellProperties" /><telerik:EditorTool Name="SetTableProperties" /><telerik:EditorSeparator /><telerik:EditorSplitButton Name="InsertSymbol"></telerik:EditorSplitButton><telerik:EditorToolStrip Name="FormatStripper"></telerik:EditorToolStrip></telerik:EditorToolGroup><telerik:EditorToolGroup><telerik:EditorSplitButton Name="Undo"></telerik:EditorSplitButton><telerik:EditorSplitButton Name="Redo"></telerik:EditorSplitButton><telerik:EditorSeparator /><telerik:EditorTool Name="Cut" /><telerik:EditorTool Name="Copy" /><telerik:EditorTool Name="Paste" ShortCut="CTRL+V" /><telerik:EditorSeparator /><telerik:EditorTool Name="PasteFromWord" /><telerik:EditorTool Name="PasteFromWordNoFontsNoSizes" /><telerik:EditorTool Name="PastePlainText" /><telerik:EditorTool Name="PasteAsHtml" /><telerik:EditorTool Name="PasteHtml" /><telerik:EditorSeparator /><telerik:EditorTool Name="Print" /><telerik:EditorTool Name="FindAndReplace" /><telerik:EditorTool Name="SelectAll" /><telerik:EditorSeparator /><telerik:EditorTool Name="InsertGroupbox" /><telerik:EditorTool Name="InsertParagraph" /><telerik:EditorTool Name="InsertHorizontalRule" /><telerik:EditorSplitButton Name="InsertSnippet"></telerik:EditorSplitButton><telerik:EditorSeparator /><telerik:EditorTool Name="InsertDate" /><telerik:EditorTool Name="InsertTime" /><telerik:EditorSeparator /><telerik:EditorTool Name="AboutDialog" /><telerik:EditorTool Name="Help" /></telerik:EditorToolGroup><telerik:EditorToolGroup><telerik:EditorTool Name="Bold" /><telerik:EditorTool Name="Italic" /><telerik:EditorTool Name="Underline" /><telerik:EditorTool Name="StrikeThrough" /><telerik:EditorSeparator /><telerik:EditorTool Name="JustifyLeft" /><telerik:EditorTool Name="JustifyCenter" /><telerik:EditorTool Name="JustifyRight" /><telerik:EditorTool Name="JustifyFull" /><telerik:EditorTool Name="JustifyNone" /><telerik:EditorSeparator /><telerik:EditorTool Name="Superscript" /><telerik:EditorTool Name="Subscript" /><telerik:EditorSeparator /><telerik:EditorTool Name="ConvertToLower" /><telerik:EditorTool Name="ConvertToUpper" /><telerik:EditorTool Name="Indent" /><telerik:EditorTool Name="Outdent" /><telerik:EditorTool Name="InsertOrderedList" /><telerik:EditorTool Name="InsertUnorderedList" /><telerik:EditorTool Name="AbsolutePosition" /><telerik:EditorTool Name="InsertSpecialLink" Text="Insert Special Link"/><telerik:EditorTool Name="LinkManager" /><telerik:EditorTool Name="Unlink" /><telerik:EditorTool Name="ToggleTableBorder" /><telerik:EditorTool Name="ToggleScreenMode" /></telerik:EditorToolGroup><telerik:EditorToolGroup Tag="DropdownToolbar"><telerik:EditorSplitButton Name="ForeColor"></telerik:EditorSplitButton><telerik:EditorSplitButton Name="BackColor"></telerik:EditorSplitButton><telerik:EditorSeparator /><telerik:EditorDropDown Name="FontName"></telerik:EditorDropDown><telerik:EditorDropDown Name="FontSize"></telerik:EditorDropDown><telerik:EditorDropDown Name="RealFontSize"></telerik:EditorDropDown><telerik:EditorDropDown Name="ApplyClass"></telerik:EditorDropDown><telerik:EditorDropDown Name="InsertCustomLink"></telerik:EditorDropDown><telerik:EditorDropDown Name="FormatBlock"></telerik:EditorDropDown><telerik:EditorDropDown Name="Zoom"></telerik:EditorDropDown></telerik:EditorToolGroup></Tools><Content></Content><ImageManager MaxUploadFileSize="9242880" DeletePaths="~/UpLoadImages" UploadPaths="~/UpLoadImages" ViewPaths="~/UpLoadImages" /><DocumentManager MaxUploadFileSize="9242880" DeletePaths="~/UploadFiles" UploadPaths="~/UploadFiles" ViewPaths="~/UploadFiles" /><FlashManager MaxUploadFileSize="9242880" DeletePaths="~/UploadFiles" UploadPaths="~/UploadFiles" ViewPaths="~/UploadFiles" /><SilverlightManager MaxUploadFileSize="9242880" DeletePaths="~/UploadFiles" UploadPaths="~/UploadFiles" ViewPaths="~/UploadFiles" /><MediaManager MaxUploadFileSize="9242880" DeletePaths="~/UploadFiles" UploadPaths="~/UploadFiles" ViewPaths="~/UploadFiles" /><TemplateManager MaxUploadFileSize="9242880" DeletePaths="~/UploadFiles" UploadPaths="~/UploadFiles" ViewPaths="~/UploadFiles" /></telerik:RadEditor><script type="text/javascript"> Telerik.Web.UI.Editor.CommandList["InsertSpecialLink"] = function (commandName, editor, args) { var elem = editor.getSelectedElement(); //returns the selected element. if (elem.tagName == "A") { editor.selectElement(elem); argument = elem; } else { var content = editor.getSelectionHtml(); var link = editor.get_document().createElement("A"); link.innerHTML = content; argument = link; } var myCallbackFunction = function (sender, args) { editor.pasteHtml(String.format("<a href={0} target='{1}' class='{2}'>{3}</a> ", args.href, args.target, args.className, args.name)) } editor.showExternalDialog( 'InsertLink.aspx', argument, 870, 600, myCallbackFunction, null, 'Insert Link', true, Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move, false, false); }; </script>

 

 

Rumen
Telerik team
 answered on 07 May 2024
1 answer
229 views

I am trying to remove the curly red underlines for misspelled words and outlined here: Disable browser spellcheck and curly red underlines in RadEditor content area. But the OnClientLoad event never fires. There are no errors on the console log, the editor is enabled, and it is visible.

I'm a little stuck as to what else I can try.

        <div class="SectionBody">
            <telerik:RadEditor ID="redPlan" runat="server" SkinID="EditorDefault" Height="170" Width="500" OnClientLoad="OnClientLoad" />
            <asp:CustomValidator ID="cvPlan" runat="server" ControlToValidate="redPlan" ClientValidationFunction="EditorRequired" ValidateEmptyText="true"
                Text="Required" ValidationGroup="vgDAP" />
        </div>

<telerik:RadScriptBlock runat="server">
    <script type="text/javascript">
        function OnClientLoad(sender, args) {
            sender.get_contentArea().setAttribute("spellcheck", "false");
        }
    </script>
</telerik:RadScriptBlock>


Rumen
Telerik team
 answered on 07 May 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?