Pending Review
Last Updated: 14 Jul 2025 14:17 by Matthias
Created by: Matthias
Comments: 0
Category: UI for ASP.NET AJAX
Type: Bug Report
0

Hello Progress team,

we're using the HtmlChart and RadialGauge components of your Telerik for AJAX suite and are encountering some inconsistencies between the two.

To be able to use the exportable SVGs of those components server-side, we've extended your classes and added two asp:HiddenFields each, so we can post the SVG and the dimensions back to the server for further processing. (Setting the values is handled in a button OnClientClick JavaScript function, that's irrelevant to this thread.)

As of 2019, when we first introduced the respective feature in our software, the code looked like this:

  • Similar for both components
  • In both cases the additional HiddenFields get added to the Controls-List "OnInit" before the base.OnInit-event.
  • In both cases we had to override the "Render"-function to also render the HiddenField-Controls to the HTML.
public class ExportableRadHtmlChart : RadHtmlChart, INamingContainer
{
    private HiddenField _svgData = new HiddenField();
    private HiddenField _svgDimensions = new HiddenField();
    public ExportableRadHtmlChart()
    {
        _svgData.ID = "SVGData";
        _svgDimensions.ID = "SVGDimensions";
    }

    protected override void OnInit(EventArgs e)
    {
        Controls.Add(_svgData);
        Controls.Add(_svgDimensions);
        
        base.OnInit(e);
    }
    
    protected override void Render(HtmlTextWriter writer)
    {
        writer.RenderBeginTag(HtmlTextWriterTag.Div);

        base.Render(writer);

        _svgData.RenderControl(writer);
        _svgDimensions.RenderControl(writer);

        writer.RenderEndTag();
    }
}

and

public class ExportableRadRadialGauge : RadRadialGauge, INamingContainer
{
    private HiddenField _svgData = new HiddenField();
    private HiddenField _svgDimensions = new HiddenField();
    public ExportableRadRadialGauge()
    {
        _svgData.ID = "SVGData";
        _svgDimensions.ID = "SVGDimensions";
    }

    protected override void OnInit(EventArgs e)
    {
        Controls.Add(_svgData);
        Controls.Add(_svgDimensions);
        
        base.OnInit(e);
    }

    protected override void Render(HtmlTextWriter writer)
    {
        writer.RenderBeginTag(HtmlTextWriterTag.Div);

        base.Render(writer);

        _svgData.RenderControl(writer);
        _svgDimensions.RenderControl(writer);

        writer.RenderEndTag();
    }
}

With this code, we've been running the Telerik product version 2023.1.323.45.

 

Now, we've updated to Telerik product version 2025.1.416.462 and are experiencing the following inconsistencies:

  1. Using the same code as before, the HiddenFields of class "ExportableRadHtmlChart" render twice:


    Whereas previously, they've only rendered once:

    Removing the custom "Render"-function of the class "ExportableRadHtmlChart" resolves this issue. (Having duplicates of those HiddenFields actually causes issues on repeated PostBacks, as two HiddenFields at a time have the same ClientID and thus their values get packed as a comma separated list before transmission to the server, which in turn yields issues when parsing the SVG, which in reality are multiple comma separated SVGs.

    The SVG values are truncated in this view, but the dimensions paint a pretty clear picture, as to what's happening here after 4 PostBacks.) Despite requiring to make this adjustment to our software, we're glad, we can discard that custom "Render"-function.
  2. The "ExportableRadRadialGauge", on the other hand, still only renders the HiddenFields with the custom "Render"-function included. Can we expect a similar fix to the RadialGauge, s.t. we don't require to render the HiddenFields ourselves?

As I'm unsure of the "Theme name", I've put "ControlDefault". But I don't think that should matter too much. If it does, I'll try to find the correct value.

Kind regards,
Matthias

 


    Pending Review
    Last Updated: 11 Jun 2025 07:28 by Anchal

    Summary 

    After editing an Excel `.xlsx` file using Telerik RadSpreadsheet and saving it via the default Save option, the saved file becomes corrupted. It no longer opens in RadSpreadsheet (throws an error) and shows a repair warning in Microsoft Excel. 

    Reproduction Steps 

    1. Upload an Excel `.xlsx` file to the `ABC` folder on the server. 

    2. Load the file in RadSpreadsheet via a basic viewer page. 

    3. Make any small edit (e.g., change a cell’s value). 

    4. Click the built-in Save option in the RadSpreadsheet toolbar. 

    5. Attempt to: 

       - Reopen the saved file in RadSpreadsheet → Error: Object reference not set to an instance of an object. 

       - Open in Excel → Warning: “We found a problem with some content in ‘filename’. Do you want us to try to recover as much as we can?” 

    Files Attached 

    - `Original.xlsx` — Before editing, opens fine in both RadSpreadsheet and Excel. 

    - `Modified.xlsx` — After saving via RadSpreadsheet, causes errors. 

    - Screenshot of: 

       - RadSpreadsheet error : 

    Picture 

       - Excel repair prompt 

    Picture 

    Code Snippet : 

    <telerik:RadSpreadsheet ID="sample" runat="server" Visible="false" style="font-size: 10px;" /> 

    protected void Page_Load(object sender, EventArgs e) 

    { 

        string fileName = (string)Session["SelectedFileName"]; 

        SheetLoad(fileName); 

    } 

      

    private void SheetLoad(string fileName) 

    { 

        try 

        { 

            string filePath = Server.MapPath("~/ABC/" + fileName); 

            if (!File.Exists(filePath)) 

            { 

                string errorMsg = "File not found: " + filePath; 

                ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('File not found!');", true); 

                return; 

            } 

      

            // Load spreadsheet using Telerik document provider 

            sample.Provider = new SpreadsheetDocumentProvider(filePath); 

            sample.Visible = true; 

        } 

        catch (Exception ex) 

        { 

            string errorMsg = "Error opening file: " + ex.Message + " | File: " + fileName; 

            ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Error loading file!');", true); 

        } 

    } 

      

    **Observation:** 

      

    * This only happens for **some files**, especially ones that likely contain advanced Excel features. 

    * Other simpler files save and reload without any issue. 

      

    **Assumption:** 

    It seems the default save behavior of RadSpreadsheet is **not preserving some Excel structures**, leading to file corruption on save. 

      

     


    Pending Review
    Last Updated: 24 May 2025 15:25 by Ralph

    Dear Telerik Support.  I found another bug related to this one below.

    https://feedback.telerik.com/aspnet-ajax/1688270-uncaught-typeerror-cannot-read-properties-of-null-reading-classname?_gl=1*iuxa0l*_gcl_au*NjcwNTkzNi4xNzQ3Njc4MzQz*_ga*OTAxNzk1OTc4LjE3Mzk4MjI5NzY.*_ga_9JSNBCSF54*czE3NDgwOTkxODEkbzIxJGcxJHQxNzQ4MDk5NTIzJGo1NCRsMCRoMCRkRlJROUp0Q0RDUUZTUlZUeFlLLU9ja3RBc2UwczF3ZU55Zw..

    This line of code also causes the same issue.

    $find("txtYear").clear();

    See attached Console debug output.

    It is my opinion that a hot fix needs to be done asap!  The work around that Derek posted on May 23rd falls short of the bigger issue.  This is a serious matter and needs to be addressed immediately.