Edit data when export to Excel

  1. #1

    Edit data when export to Excel

    Hi

    Using EXT.NET 4, but the question is not EXT.NET specific i think

    In this example
    https://examples1.ext.net/#/GridPane...Data_PostBack/

    If you want to change the Company Name, where will i do it?

    Something like this:
    if (data=="American Express Company"){
     NewCompanyName="Amex";
    }
    And i want the NewCompanyName exported to Excel.

    Understand?! :-)

    Reegards

    Johan
    Last edited by xDroid; Jan 25, 2017 at 12:07 PM.
  2. #2
    Hello @xDroid!

    Please enclose code blocks withing [code][/code] blocks, it makes it indentable and much more readable. Would you mind editing your post to fix it?

    You say you are using Ext.NET 4 but point us to Ext.NET 1 example. Well, I just took the equivalent Ext.NET 4 example and updated the record as it seems your pseudocode suggested. This could be done (among other ways of course) with a script like this:

    var recId = App.GridPanel1.store.findExact("company", "American Express Company"),
        view = App.GridPanel1.getView();
    
    if (recId >= 0) {
     var rec = App.GridPanel1.store.getAt(recId).data;
     rec.company = "AMEX";
     view.refresh();
    } else {
     console.log("not found.");
    }
    Hope this helps!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. export gridpanel data to excel
    By AbdallahAshour in forum 3.x Help
    Replies: 4
    Last Post: Jul 30, 2015, 7:21 AM
  2. Export data to excel with color
    By Cris in forum 1.x Help
    Replies: 4
    Last Post: Oct 27, 2014, 12:25 PM
  3. [CLOSED] Export data to excel
    By immenso in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 16, 2013, 4:42 AM
  4. MVC Razor - export data to excel or csv
    By Ishrath in forum 2.x Help
    Replies: 4
    Last Post: Nov 14, 2012, 11:39 AM
  5. How can Export data from GridPanel to Excel
    By delta in forum 2.x Help
    Replies: 2
    Last Post: Nov 14, 2012, 1:07 AM

Posting Permissions