Unplanned
Last Updated: 27 Apr 2020 10:42 by ADMIN
Jerry
Created on: 27 Apr 2020 10:40
Category: Spreadsheet
Type: Feature Request
1
Server-side support for Named Ranges

The RadSpreadsheet server-side object does not support Named Ranges. 

Workaround:

Nevertheless, you can load them client-side with the code below, by saving a JSON in a hidden field and loading it via the API:

protected void Page_Init(object sender, EventArgs e)
{
    var path = Server.MapPath("~/App_Data/spreadsheet.xlsx");
    var workbook = Workbook.Load(path);
    HiddenField1.Value = workbook.ToJson();
}

<script>    
    function pageLoadHandler() {
        var spreadsheet = $find("<%= RadSpreadsheet1.ClientID %>");
        var hiddenfield = $get("<%= HiddenField1.ClientID %>");
        if (hiddenfield.value) {
            spreadsheet.get_kendoWidget().fromJSON(JSON.parse(hiddenfield.value))
            hiddenfield.value = '';
        }

        // Sys.Application.remove_load(pageLoadHandler);  
    }
    Sys.Application.add_load(pageLoadHandler);
</script>
<telerik:RadSpreadsheet runat="server" ID="RadSpreadsheet1"></telerik:RadSpreadsheet>
<asp:HiddenField runat="server" ID="HiddenField1" />

 

Attached Files:
0 comments