Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
12 views

Hello,

I have a RadGrid embedded in a RadTabStrip. This is defined in a UserControl with a RadAjaxManagerProxy. It displays content from a DB server. I have a GridButtonColumn that is defined below. Everything works fine except that when I try to delete a row by clicking on the icon it won't work initially. A second click results in a callback to the server's RgAttachments_ItemCommand appropriately. This behaviour happens consistently. I took a look at the generated code and noticed a difference in the button's clientside onclick handler

 

This following generated javascript works

if(!$find('ctl00_MainContent_ctlRqstAttachments_RgAttachmentRevision').confirm('Are you sure you wish to delete this file attachment?', event, 'ctl00_MainContent_ctlRqstAttachments_RgAttachmentRevision', 'Delete'))return false;__doPostBack('ctl00$MainContent$ctlRqstAttachments$RgAttachmentRevision$ctl00$ctl14$ctl00','')

This generated code doesn't

if(!$find('ctl00_MainContent_ctlRqstAttachments_RgAttachmentRevision').confirm('Are you sure you wish to delete this file attachment?', event, 'ctl00_MainContent_ctlRqstAttachments_RgAttachmentRevision', 'Delete'))return false;__doPostBack('ctl00$MainContent$ctlRqstAttachments$RgAttachmentRevision$ctl00$ctl12$ctl01','')

 

The column in question

                            <telerik:GridButtonColumn HeaderText="Delete" ConfirmText="Are you sure you wish to delete this file attachment?" ConfirmDialogType="RadWindow" ButtonCssClass="btn btn-outline-danger btn-sm rounded" ConfirmTitle="Delete" ButtonType="FontIconButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" ItemStyle-ForeColor="Red">
                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                            </telerik:GridButtonColumn>

 

Any help to resolve this is greatly appreciated

Gavin
Top achievements
Rank 1
Iron
 answered on 28 Apr 2025
0 answers
20 views

HI Guys

I was wondering if you WebForms PdfViewer can accomplish updating fillable PDF and save the data entries into a new PDF, explain

I have a fillable PDF with a few fillable textboxes, and I would like to capture the user inputs and save as a new PDF for then later continue filling the blanks loading the new saved PDF.

I've tried accomplishing the task using iTextSharp but it was not possible here is my code for reference.


string existingPdfilePath = Server.MapPath("~/export/I-693_1000_202502191951256806.pdf");
 string updatedPdfPath = Server.MapPath("~/App_Data/I-693_" + Guid.NewGuid().ToString() + ".pdf");

 using (FileStream pdfReaderStream = new FileStream(existingPdfilePath, FileMode.Open, FileAccess.Read))
            {
                using (FileStream pdfWriterStream = new FileStream(updatedPdfPath, FileMode.Create, FileAccess.Write))
                {
                    PdfReader reader = new PdfReader(pdfReaderStream);
                    PdfStamper stamper = new PdfStamper(reader, pdfWriterStream);

                    AcroFields formFields = stamper.AcroFields;
                    foreach (DictionaryEntry de in reader.AcroFields.Fields)
                    {
                        //sb.Append(de.Key.ToString() + Environment.NewLine);
                        var fullname = formFields.GetTranslatedFieldName(de.Key.ToString());
                        formFields.RenameField(fullname, Guid.NewGuid().ToString("N"));
                        if (de.Key.ToString() != fullname)
                            if (!String.IsNullOrEmpty(de.Value.ToString()))
                            {
                                if (fullname != "form1[0].#pageSet[0].Page1[9].PDF417BarCode2[0]")
                                {
                                    formFields.SetField(de.Key.ToString(), de.Value.ToString());
                                }
                            }
                    }
                    stamper.Close();
                    reader.Close();
                }

As a PDFViewer I am using the plain html embed tag

 <embed class="pdf" 
               src=
"~/Templates/I-693_100_2025045512.pdf"
            width="800" height="500" />

The user data entries vanish like a ghost, and when saving it just make a copy of the original with no captured data entries

Can your PDFViewer accomplish the task?

Al
Top achievements
Rank 1
 updated question on 01 Apr 2025
2 answers
89 views
Dear Progress Team,

 

We are currently facing an issue with upgrading Telerik.Web.UI.dll  version from 2021.3.1111.40 to the 2024.4.1114.462 in our application.

Our application uses the RadScheduler component, which was functioning without any issues prior to the upgrade.

However, after upgrading to the 2024 version of Telerik.Web.UI, the Scheduler component begins throwing the attached error (stack trace attached Error2.png).

Upon investigation, it appears that the 2024 version of Telerik.Web.UI has a dependency on Newtonsoft.Json version 13.0.

Currently, our application utilizes Newtonsoft.Json version 12.0.

Upgrading to version 13.0 is not feasible in the short term due to multiple dependencies that require comprehensive testing.

 

We kindly seek your clarification and assistance with the following questions:

 

  1. Can you confirm whether the Telerik.Web.UI 2024.4.1114.462 version has a dependency on Newtonsoft.Json version 13.0?
  2. Is there any workaround available to resolve this issue without upgrading to Newtonsoft.Json version 13.0?

 

Your assistance and guidance on this matter would be greatly appreciated.

 

Thank you, and we look forward to your response.

 

Best regards,
Arvind Pandey.

 

Rumen
Telerik team
 answered on 18 Dec 2024
1 answer
42 views

Hi,

I am using telerik data grid, i hav menu on datagrid header, when i click its going very far from datagrid, i want to keep my this menu popup just next to header where ever I click.

 

its in aspx page and using vb.net code behind.

 

any suggestion?

 

Thanks

1 answer
58 views

I recently discovered your "Mentions" feature in WinForms and am looking to produce a WebForms version of this.  I did get close to creating this functionality; very close, actually.  Building it within the RadEditor has proven to be problematic, as the HTML created by the Editor tended to wreak havoc on my code.  It was pretty granular, in that I used character counts to track and locate "tagged"/"mentioned" users.  

Is there a WebForms version of this coming soon?  If not, can you offer some guidance on how to overcome some issues the Editor creates?

 

Rumen
Telerik team
 answered on 30 Jul 2024
1 answer
153 views

We have the RadImageGallery implemented on page. The code behind loads up one or more images by reading in an array of bytes from each file.  Occasionally, an exception is thrown when one of those images is invalid (corrupt or some other issue).  OK, that's fine, but we would like to trap the exception and handle the error in a particular way.  But... we don't seem to be able to trap it other than in our last-chance global exception handler.

The binary data is created in the NeedDataSource event, and that returns successfully.  I've added other events and set breakpoints in each of them, and they all return ok.  So, is there an event we can handle that would be appropriate for a simple try/catch block?

Pretty simple markup for the RadImageGallery control (note, all the events after the OnNeedDataSource were added simply to test out if there was a place we could try/catch the exception, but no exception was thrown in those events):

    <telerik:RadImageGallery ID="galleryImages" runat="server" RenderMode="Lightweight"
        DisplayAreaMode="Image" LoopItems="true" DataImageField="ImageBytes" DataDescriptionField="Description" DataTitleField="Title"
        OnNeedDataSource="galleryImages_NeedDataSource"
        OnDataBinding="galleryImages_DataBinding"
        OnImageRequested="galleryImages_ImageRequested" 
        OnItemCreated="galleryImages_ItemCreated" 
        OnPreRender="galleryImages_PreRender">
    </telerik:RadImageGallery>

 

Code behind for NeedDataSource (which returns successfully):

    protected void galleryImages_NeedDataSource(object sender, Telerik.Web.UI.ImageGalleryNeedDataSourceEventArgs e)
    {
        galleryImages.Visible = false;

        FileManager fileManager = new FileManager ();
        DataTable dt = fileManager.GetFileList();
        var imageFiles = fileManager.GetGalleryImages(dt);

        if (imageFiles.Count() == 0)
        {
            txtNotes.Text = "There are no image files to display.";
            return;
        }

        try
        {
            galleryImages.DataSource = imageFiles;
            galleryImages.Visible = true;
        }
        catch (Exception ex)
        {
            LogException(ex);
            ErrorMessage("An unexpected occurred while reading one or more the image files");
        }

        if (fileManager.HasErrors)
        {
            txtErrors.Text = "The following errors were encountered:<br/><ul>" + String.Join("<li>", fileManager.ErrorList) + "</ul>";
        }
    }

 

Library code that reads image files into byte arrays (also return successfully):

        public List<GalleryImage> GetGalleryImages(DataTable srcDataTable)
        {

            //...


            foreach (DataRow dr in query)
            {
                CustomImageFile f = new CustomImageFile(dr);                

                try
                {
                    byte[] byteArray = File.ReadAllBytes(f.FullFileName);
                    GalleryImage img = new GalleryImage
                    {
                        ImageBytes = byteArray,
                        Description = $"{f.Description}", // [{f.Name}]
                    };
                    imageList.Add(img);
                }
                catch (Exception ex)
                {
                    Errors.Add($"{f.Name} could not be read");
                    LogException(ex);                    
                }
            }
            return imageList;
        }

 

Yet when there is an invalid file encountered, we get this:

[ArgumentException: Parameter is not valid.]
   System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData) +1162080
   Telerik.Web.UI.BinaryImageFormatHelper.CreateImgFromBytes(Byte[] data) +69

[ArgumentException: The provided binary data may not be valid image or may contains unknown header]
   Telerik.Web.UI.BinaryImageFormatHelper.CreateImgFromBytes(Byte[] data) +120
   Telerik.Web.UI.BinaryImageTransformationFilter.ProcessImageInternal(Byte[] image) +44
   Telerik.Web.UI.BinaryImageTransformationFilter.ProcessImage(Byte[] image) +20
   Telerik.Web.UI.BinaryImageFilterProcessor.ProcessFilters(Byte[] imageData) +112
   Telerik.Web.UI.RadBinaryImage.ProcessImageData() +57
   Telerik.Web.UI.RadBinaryImage.OnPreRender(EventArgs e) +20
   System.Web.UI.Control.PreRenderRecursiveInternal() +90
   System.Web.UI.Control.PreRenderRecursiveInternal() +163

 

Attila Antal
Telerik team
 answered on 07 Jun 2024
1 answer
250 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
119 views

Hi,

 

Anyone had issue with RichText editor automatically replacing double quote " with single quote ' and vice versa, when toggling between Design and HTML mode? I have tested all options under "BUILT-IN FILTERS CONFIGURATOR" and they all switched the double quote with single quote and vice versa, which breaks the HTML5 data attribute element as the single quote formatting is important for JSON specification.

 

https://demos.telerik.com/aspnet-ajax/editor/examples/builtincontentfilters/defaultcs.aspx

 

I have attached a snippet of the code, which shows data-wb-geomap element's single quote got replaced with double quote after toggling between Design and HTML mode.

 

Before (HTML mode):

 

<div id="geomap1" class="wb-geomap position scaleline geocoder geolocation mapcontrols" data-wb-geomap='{

  "tables": [{

  "title": "Test",

  "caption": "Test",

  "id": "test",

  "zoom": true,

  "tab": true,

  "type": "symbol"

  }

  }]

  }'>

 

After (Design mode):

 

<div id="geomap1" class="wb-geomap position scaleline geocoder geolocation mapcontrols" data-wb-geomap="{

 'tables': [{

 'title': 'Test',

 'caption': 'Test',

 'id': 'test',

 'zoom': true,

 'tab': true,

 'type': 'symbol'

 }

  }]

  }'>

Rumen
Telerik team
 answered on 25 Apr 2024
1 answer
73 views

Hi everybody,
I am using telerik.web.ui 2016 version for ASP.NET website. How can I upgrade to R1 2023 SP1 version in .NET framework 4.0. I see the new version has added key validation in IIS . I don't know where to start.
We wish everyone help!

Rumen
Telerik team
 updated answer on 01 Feb 2024
0 answers
79 views

Hello,

I made an update to the newest Telerik.Web.UI Version 2023.3.1010.45 and now I cannot collapse my RadGrid-Items anymore after expanding.  Instead I can see a statusbar which is loading infinite long on the left side when the ViewState is enabled in the Sitefinity Backend. When I disable the ViewState I have the same problem, just without statusbar. There is a screenshot of the grid and my HTML-Code in the attachment. Could anybody help me?

Regards

 

Uwe
Top achievements
Rank 1
 asked on 28 Nov 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?