Hi all,
I found this great blog by infragistics on including igGrid with Durandal 2 support.
http://es.infragistics.com/community/blogs/pivanov/archive/2014/09/16/adding-iggrid-in-durandal-2.aspx
How would I do an excel export with Durandal 2? Is there an example for this?
All the examples I find for excel are using something like the following:
<script id = "exportGrid"> function exportGrid() { $.ig.GridExcelExporter.export($("#grid"), { fileName: "igGrid" }); }; </script>
This however does not seem to work using Durandal 2.
Any reference materials, sample project, or examples on how this works? I looked over the iggrid documentation without much success to find other approaches.
Thanks,
Hello,
I'm just following up to see if you need any further assistance with this issue. If so please let me know.
Hi,
This has been determined to be a wrong behavior, so I have created a support case for you with id of CAS-158258-R7X4Q8 that is linked to the Development Issue with ID of 202678. You will receive responses and notifications in the corresponding case.
Please let me know if I may be of any further assistance to you.
Hi. you are right. Anyway my suggestion was just to test if this would work on your side. I am continuing my investigation to figure this out - as I said issue is that $.ig.excel for some reason is not available, even though infragistics.excel.js is properly loaded as a resource. I will keep you posted with my findings.
If I put only those scripts in index.html, $ / jquery among others will come up as undefined because they are not defined in index.html. You would end up having to define all dependencies in index.html, knockout, mapping, etc. I am not sure that approach would work either.
Do you happen to experience the same if you reference the necessary resources in the index.html ?:
<!-- Ignite UI Required Combined JavaScript Files --> <script src="http://cdn-na.infragistics.com/igniteui/2015.1/latest/js/infragistics.core.js"></script> <script src="http://cdn-na.infragistics.com/igniteui/2015.1/latest/js/infragistics.dv.js"></script> <script src="http://cdn-na.infragistics.com/igniteui/2015.1/latest/js/modules/infragistics.excel.js"></script>
<!-- External files for exporting --> <script src="http://www.igniteui.com/js/external/FileSaver.js"></script> <script src="http://www.igniteui.com/js/external/Blob.js"></script>
When you reference those and run $.ig.GridExcelExporter.export($("#grid")); what's the result ? Looking forward to hearing from you.