Download the flexgrid data into .txt file

Posted by: muddam.kranthi on 6 April 2021, 12:15 am EST

    • Post Options:
    • Link

    Posted 6 April 2021, 12:15 am EST

    Hi Team,

    I have requirement to download the flexgrid data into text file when click on download button.

    It it feasible, If so could please help with some code sample.

    Thanks,

    Kranthi

  • Posted 6 April 2021, 4:24 pm EST

    Hi Kranthi,

    You can get the grid’s data using the getClipString method and save this data using the saveFile method of Wijmo:

    let rng = new wjGrid.CellRange(0, 0, flexGrid.rows.length - 1, flexGrid.columns.length - 1);
    var txt = flexGrid.getClipString(rng, true, true, true); // save CSV with column and row headers
    saveFile(csv, 'FlexGrid.txt');
    

    Regards,

    Ashwin

  • Posted 7 April 2021, 7:47 pm EST

    Hi Ashwin,

    It worked.

    Thank you!

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels