Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

212
Views
JavaScript exporting Telerik Grid false

I am adding an export to excel feature to an already existing (and functional) web page.

The JavaScript to export my RadGrid:

function onRequestStart(sender, args) {
    if (isExporting) {
        args.set_enableAjax(false);
    }
}

function exportToExcel(sender, args) {
    console.log("Made it here!");

    isExporting = true;

    var masterTable = $find('<%= MyGrid.ClientID %>').get_masterTableView();
    console.log(masterTable);
    masterTable.exportToExcel();
    console.log(masterTable.exportToExcel());

    isExporting = false;
}

The RadGrid that is created comes from a separate JS file, so not sure what to show here except for the radgrid creation line I guess. The file that all of this code exists in is a .aspx file.

<telerik:RadGrid ID="MyGrid" runat="server" AutoGenerateColumns="false" Width="100%" Height="100%" AllowSorting="true">
    <ClientSettings EnablePostBackOnRowClick="false>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
        <Selecting AllowRowSelect="true" />
        <ClientEvents OnCommand="function(sender,args) { myLibrary.mainGrid.onGridCommand(sender, args) }"
                      OnRowDataBound="function(sender,args) { mylibrary.mainGrid.onRowDatabound(sender,args) }"
                      OnRowClick="function(sender,args) { mylibrary.mainGrid.onRowClick(sender,args) }"
                      onRowMouseOut="function(sender,args) { mylibrary.mainGrid.onRowMouseOut(sender,args)}"/>
    </ClientSettings>
    <MasterTableView CommandItemDisplay="None" ClientDataKeyNames="Cant share these :)" TableLayout="Auto" 
                     AllowPaging="true" PageSize="20">
        ... fill out table with <NoRecordsTemplate>, <PagerStyle>, <Columns>
    </MasterTableView>
</telerik:RadGrid>

The issue:

When my function gets called I log stuff to see what happens on the inside...

  • I see the "Made it Here!"
  • I see the masterTable variable get filled with data that seems correct. Main thing here Im guessing is the portion of it labeled _dataSource and _dataItems.
  • Then I see a false for the value for masterTable.exportToExcel();

Why is the false being shown for a variable that seems to contain the important information?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!