Hi,
I am exporrting igHierarchicalGrid but getting error infragistics.excel.js:88 Uncaught TypeError: $$t.$fw.getBox is not a function(…)
I am loading file in this order
<script src="/plugins/infragistics/js/infragistics.loader.js"></script><script src="/plugins/infragistics/js/infragistics.core.js"></script><script src="/plugins/infragistics/js/infragistics.dv.js"></script><script src="/plugins/infragistics/js/infragistics.lob.js"></script><script src="/plugins/infragistics/js/infragistics.gridexcelexporter.js"></script><script src="/plugins/infragistics/js/infragistics.excel.js"></script><script src="/plugins/infragistics/js/FileSaver.js"></script><script src="/plugins/infragistics/js/Blob.js"></script>
If I don't include infragistics.excel.js I get following error infragistics.gridexcelexporter.js:23 Uncaught TypeError: Cannot read property 'Workbook' of undefined(…)
This happens for igGrid Export as well.
I am calling Ecport grid as follows
$("#exportButton").on("onclick", function () { $.ig.GridExcelExporter.exportGrid($("#Grid"), { fileName: "igGrid", worksheetName: "Sheet1", tableStyle: "tableStyleLight13", dataExportMode: "allRows" }); });
Please help.
Thank you for the code snippets provided. The code itself is fine and what seems to be causing issues is the way the resources are referenced.
The infragistics.core.js and infragistics.lob.js contain all code needed for most IgniteUI components to work, except data visualization components like the charts, which require the infragistics.dv.js resource to be loaded. At the same time you are referencing also the igLoader, that loads only the required resources on demand. This is valid for all scenarios, while for using the igGridExcelExporter also the infragistics.documents.core.js and infragistics.excel.js should be loaded before the infragistics.gridexcelexporter.js.
Considering the above there are two ways to configure the references right:
1) Load all resources:
<script src="/plugins/infragistics/js/FileSaver.js"></script><script src="/plugins/infragistics/js/Blob.js"></script>
<script src="/plugins/infragistics/js/infragistics.core.js"></script><script src="/plugins/infragistics/js/infragistics.dv.js"></script><script src="/plugins/infragistics/js/infragistics.lob.js"></script>
<script src="/plugins/infragistics/js/modules/infragistics.documents.core.js"></script><script src="/plugins/infragistics/js/modulesinfragistics.excel.js"></script><script src="/plugins/infragistics/js/infragistics.gridexcelexporter.js"></script>
2) Use igLoader to load only required resources:
<script src="http://www.igniteui.com/js/external/FileSaver.js"></script> <script src="http://www.igniteui.com/js/external/Blob.js"></script>
<!-- Ignite UI Loader Script --> <script src="="/plugins/infragistics/js/infragistics.loader.js"></script>
<script> $.ig.loader({ scriptPath: "="="/plugins/infragistics/js/", cssPath: "="="/plugins/infragistics/css/", resources:'igGrid.*,' + 'modules/infragistics.documents.core.js,' + 'modules/infragistics.excel.js,' + 'modules/infragistics.gridexcelexporter.js' });
$.ig.loader(function () { ... // your code }); </script>
Please refer to igLoader API documentation for more information on loading resources.
Hello Hristo,
I changed the references as suggessted, but I am still getting error.
We are loading all the references and I get that error before clicking the button for Export. (getting error right after loading everything)
I am using Version: Infragistics Professional 2016 VOL 1
Please remove the infragistics.dv.js reference and let me know if the same error is thrown, or this solves the issue.
After removing infragistics.dv.js reference above error goes away but I get new error
infragistics.excel.js:24 Uncaught TypeError: $$t.$c7.u is not a function(…)
also after clicking the Export button I get error infragistics.excel.js:30 Uncaught TypeError: $$t.$cg.c is not a function(…)
Does this have to be without infragistics.dv.js reference? We need it in our code because we are using Charts in our application as well.
There is an issue when using excel library along with data visualization controls, though I was not able to reproduce it with latest version of IgniteUI. Please let me know the exact version of IgniteUI that you are using and ideally a working sample that I can investigate for you.
Thank you for the code shared.
I ran a sample using it and using version 16.1.20161.1009. The sample is loading fine and the errors you mention are not reproduced. When trying to export the grid another error is thrown:
infragistics.gridexcelexporter.js:23 Uncaught TypeError: gridColumn.formatter is not a function(…)
, which is a known one and is already fixed ( I can provide you with a biweekly build containing the fix for this error, or you can wait the official service release which is scheduled to roll out on 16th December). A temporary workaround for this error is to remove the formatter: null definitions from your columns)
Please refer to the attached sample and use it to make a comparison with yours to see what is causing the issue on your side. I assume it may have something due to the chart you are loading, so you may try to load the same chart as yours on my sample and see if the error will occur. Once you reproduce the issue (or tell me the chart configuration that you have on your side), you may send the modified sample or the chart code and I will be able to help you further.
I am looking forward to hearing from you.
Version I am using is Infragistics.Web.ClientUI infragistics.excel.js 16.1.20161.1009
Js Files get loaded as below
<script src="/plugins/jquery-1.10.2.min.js"></script><script src="/plugins/jquery-ui.js"></script><script src="/plugins/modernizr-2.7.1.js"></script><script src="/plugins/jquery.sparkline.js"></script><script src="/plugins/Silverlight.js"></script>
<script src="/plugins/infragistics/js/FileSaver.js"></script><script src="/plugins/infragistics/js/Blob.js"></script><script src="/plugins/infragistics/js/infragistics.core.js"></script><script src="/plugins/infragistics/js/infragistics.lob.js"></script><script src="/plugins/infragistics/js/infragistics.excel.js"></script><script src="/plugins/infragistics/js/infragistics.gridexcelexporter.js"></script>
The second the My page loads (even bofore making call to DB) I get error infragistics.excel.js:24 Uncaught TypeError: $$t.$c7.u is not a function(…)
After I load Data and Hit Export Button I get these errors.
infragistics.excel.js:24 Uncaught TypeError: $$t.$c7.u is not a function(…)http://localhost:52508/__browserLink/requestData/7f8f5264ce064c049be8fa7ab7057a63?version=2 Failed to load resource: the server responded with a status of 404 (Not Found)infragistics.excel.js:30 Uncaught TypeError: $$t.$cg.c is not a function(…)
Below is the Code Sinnpet, Hope it helps.
<input type="button" id="exportButton" value="Export" /><table id="Grid" style="margin-top: 1px; margin-bottom:10px;"></table>
@section scripts {<script type="text/javascript"> $(function () { var data = [{"sector":"TOTAL","class2":"","class3":"","ticker":"","bench_dur_contrib_pct":100.0,"bench_pct":100.0,"market_value":219211089.89,"pct_variance":0.0,"port_dur_contrib_pct":100.0,"port_pct":100.0,"position":213004719.99,"book_value":215264031.16,"gain_loss":3947058.73,"book_yield":3.24353619469199,"port_oad":5.49241215516641,"bench_oad":5.4369154279876,"barclays_rating":"A1","moody_rating":"A1","sp_rating":"A+","fitch_rating":"AA-","port_sector_pct":0.0,"bench_sector_pct":0.0,"pct_sector_variance":0.0,"port_dur_contrib":5.49241215516641,"bench_dur_contrib":5.4369154279876,"dur_contrib_diff":0.0554967271788147,"outlook":"","target_rating":"","tickers":[]},{"sector":"ABS","class2":"","class3":"","ticker":"","bench_dur_contrib_pct":1.0656050780438200,"bench_pct":2.500,"market_value":8996001.34,"pct_variance":1.6038075877065300,"port_dur_contrib_pct":1.0847848656230100,"port_pct":4.1038075877065300,"position":8959807.07,"book_value":8972175.94,"gain_loss":23825.4,"book_yield":1.48709955152295,"port_oad":1.45184330755091,"bench_oad":2.31744187558334,"barclays_rating":"AAA","moody_rating":"AAA","sp_rating":"AAA","fitch_rating":"AAA","port_sector_pct":100.0,"bench_sector_pct":0.0,"pct_sector_variance":100.0,"port_dur_contrib":0.0595808558168836,"bench_dur_contrib":0.0579360468895835,"dur_contrib_diff":0.00164480892730013,"outlook":"","target_rating":"","tickers":[{"reportGroup":null,"sector":"ABS","class2":"ABS","class3":"CAR_LOAN","ticker":"AFIN","position":0.0,"market_value":0.0,"pct_variance":-0.057723832115133300,"port_pct":0.0,"bench_pct":0.057723832115133300,"port_dur_contrib_pct":0.0,"bench_dur_contrib_pct":0.016281379771759600,"book_value":0.0,"gain_loss":0.0,"book_yield":0.0,"port_oad":0.0,"bench_oad":1.53351712154948,"barclays_rating":"","moody_rating":"","sp_rating":"","fitch_rating":"","port_sector_pct":0.0,"bench_sector_pct":2.3089532846053300,"pct_sector_variance":-2.3089532846053300,"port_dur_contrib":0.0,"bench_dur_contrib":0.000885204848700047,"dur_contrib_diff":-0.000885204848700047,"outlook":"","target_rating":""}]}];
var columns = [{"headerText":"","description":null,"key":"sector","dataType":"string","template":"<div style='text-align: left'>${sector}</div>","hidden":false,"width":"100px","format":null,"formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":true,"includeHiddenInExport":false},{"headerText":"Par","description":null,"key":"position","dataType":"number","template":"<div style='text-align: right;' {{if parseFloat(${position}) < 0}} class='grid-negative-number'{{/if}}>${position}</div>","hidden":false,"width":"80px","format":"int","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Market","description":null,"key":"market_value","dataType":"number","template":"<div style='text-align: right;' {{if parseFloat(${market_value}) < 0}} class='grid-negative-number'{{/if}}>${market_value}</div>","hidden":false,"width":"80px","format":"int","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Book","description":null,"key":"book_value","dataType":"number","template":"<div style='text-align: right;' {{if parseFloat(${book_value}) < 0}} class='grid-negative-number'{{/if}}>${book_value}</div>","hidden":false,"width":"80px","format":"int","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Gain/Loss","description":null,"key":"gain_loss","dataType":"number","template":"<div style='text-align: right;' {{if parseFloat(${gain_loss}) < 0}} class='grid-negative-number'{{/if}}>${gain_loss}</div>","hidden":false,"width":"80px","format":"int","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"B Yld","description":null,"key":"book_yield","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${book_yield}) < 0 || (${book_yield}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${book_yield}</div>","hidden":false,"width":"50px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"% Port","description":null,"key":"port_pct","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${port_pct}) < 0 || (${port_pct}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${port_pct}</div>","hidden":false,"width":"50px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"% BM","description":null,"key":"bench_pct","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${bench_pct}) < 0 || (${bench_pct}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${bench_pct}</div>","hidden":false,"width":"50px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"% Var","description":null,"key":"pct_variance","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${pct_variance}) < 0 || (${pct_variance}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${pct_variance}</div>","hidden":false,"width":"50px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"% Port Sector","description":null,"key":"port_sector_pct","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${port_sector_pct}) < 0 || (${port_sector_pct}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${port_sector_pct}</div>","hidden":false,"width":"80px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"% BM Sector","description":null,"key":"bench_sector_pct","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${bench_sector_pct}) < 0 || (${bench_sector_pct}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${bench_sector_pct}</div>","hidden":false,"width":"80px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"% Sector Var","description":null,"key":"pct_sector_variance","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${pct_sector_variance}) < 0 || (${pct_sector_variance}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${pct_sector_variance}</div>","hidden":false,"width":"80px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Port Dur","description":null,"key":"port_oad","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${port_oad}) < 0 || (${port_oad}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${port_oad}</div>","hidden":false,"width":"50px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"BM Dur","description":null,"key":"bench_oad","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${bench_oad}) < 0 || (${bench_oad}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${bench_oad}</div>","hidden":false,"width":"50px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Port DC","description":null,"key":"port_dur_contrib","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${port_dur_contrib}) < 0 || (${port_dur_contrib}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${port_dur_contrib}</div>","hidden":false,"width":"50px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"BM DC","description":null,"key":"bench_dur_contrib","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${bench_dur_contrib}) < 0 || (${bench_dur_contrib}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${bench_dur_contrib}</div>","hidden":false,"width":"50px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"DC Diff","description":null,"key":"dur_contrib_diff","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${dur_contrib_diff}) < 0 || (${dur_contrib_diff}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${dur_contrib_diff}</div>","hidden":false,"width":"50px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"% Dur Con","description":null,"key":"port_dur_contrib_pct","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${port_dur_contrib_pct}) < 0 || (${port_dur_contrib_pct}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${port_dur_contrib_pct}</div>","hidden":false,"width":"80px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"% BM Dur Con","description":null,"key":"bench_dur_contrib_pct","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${bench_dur_contrib_pct}) < 0 || (${bench_dur_contrib_pct}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${bench_dur_contrib_pct}</div>","hidden":false,"width":"80px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Barclays","description":null,"key":"barclays_rating","dataType":"string","template":"<div style='text-align: left'>${barclays_rating}</div>","hidden":false,"width":"50px","format":null,"formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Moody","description":null,"key":"moody_rating","dataType":"string","template":"<div style='text-align: left'>${moody_rating}</div>","hidden":false,"width":"50px","format":null,"formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"S&P","description":null,"key":"sp_rating","dataType":"string","template":"<div style='text-align: left'>${sp_rating}</div>","hidden":false,"width":"50px","format":null,"formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Fitch","description":null,"key":"fitch_rating","dataType":"string","template":"<div style='text-align: left'>${fitch_rating}</div>","hidden":false,"width":"50px","format":null,"formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Outlook","description":null,"key":"outlook","dataType":"string","template":"<div style='text-align: left'>${outlook}</div>","hidden":false,"width":"50px","format":null,"formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Target Rating","description":null,"key":"target_rating","dataType":"string","template":"<div style='text-align: left'>${target_rating}</div>","hidden":false,"width":"80px","format":null,"formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false}];
var columnLayouts = [{"headerText":"","description":null,"key":"ticker","dataType":"string","template":"<div style='text-align: left'>${ticker}</div>","hidden":false,"width":"96px","format":null,"formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":true,"includeHiddenInExport":false},{"headerText":"Par","description":null,"key":"position","dataType":"number","template":"<div style='text-align: right;' {{if parseFloat(${position}) < 0}} class='grid-negative-number'{{/if}}>${position}</div>","hidden":false,"width":"80px","format":"int","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Market","description":null,"key":"market_value","dataType":"number","template":"<div style='text-align: right;' {{if parseFloat(${market_value}) < 0}} class='grid-negative-number'{{/if}}>${market_value}</div>","hidden":false,"width":"80px","format":"int","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Book","description":null,"key":"book_value","dataType":"number","template":"<div style='text-align: right;' {{if parseFloat(${book_value}) < 0}} class='grid-negative-number'{{/if}}>${book_value}</div>","hidden":false,"width":"80px","format":"int","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Gain/Loss","description":null,"key":"gain_loss","dataType":"number","template":"<div style='text-align: right;' {{if parseFloat(${gain_loss}) < 0}} class='grid-negative-number'{{/if}}>${gain_loss}</div>","hidden":false,"width":"80px","format":"int","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"B Yld","description":null,"key":"book_yield","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${book_yield}) < 0 || (${book_yield}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${book_yield}</div>","hidden":false,"width":"50px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"% Port","description":null,"key":"port_pct","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${port_pct}) < 0 || (${port_pct}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${port_pct}</div>","hidden":false,"width":"50px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"% BM","description":null,"key":"bench_pct","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${bench_pct}) < 0 || (${bench_pct}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${bench_pct}</div>","hidden":false,"width":"50px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"% Var","description":null,"key":"pct_variance","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${pct_variance}) < 0 || (${pct_variance}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${pct_variance}</div>","hidden":false,"width":"50px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"% Port Sector","description":null,"key":"port_sector_pct","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${port_sector_pct}) < 0 || (${port_sector_pct}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${port_sector_pct}</div>","hidden":false,"width":"80px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"% BM Sector","description":null,"key":"bench_sector_pct","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${bench_sector_pct}) < 0 || (${bench_sector_pct}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${bench_sector_pct}</div>","hidden":false,"width":"80px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"% Sector Var","description":null,"key":"pct_sector_variance","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${pct_sector_variance}) < 0 || (${pct_sector_variance}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${pct_sector_variance}</div>","hidden":false,"width":"80px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Port Dur","description":null,"key":"port_oad","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${port_oad}) < 0 || (${port_oad}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${port_oad}</div>","hidden":false,"width":"50px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"BM Dur","description":null,"key":"bench_oad","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${bench_oad}) < 0 || (${bench_oad}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${bench_oad}</div>","hidden":false,"width":"50px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Port DC","description":null,"key":"port_dur_contrib","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${port_dur_contrib}) < 0 || (${port_dur_contrib}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${port_dur_contrib}</div>","hidden":false,"width":"50px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"BM DC","description":null,"key":"bench_dur_contrib","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${bench_dur_contrib}) < 0 || (${bench_dur_contrib}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${bench_dur_contrib}</div>","hidden":false,"width":"50px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"DC Diff","description":null,"key":"dur_contrib_diff","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${dur_contrib_diff}) < 0 || (${dur_contrib_diff}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${dur_contrib_diff}</div>","hidden":false,"width":"50px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"% Dur Con","description":null,"key":"port_dur_contrib_pct","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${port_dur_contrib_pct}) < 0 || (${port_dur_contrib_pct}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${port_dur_contrib_pct}</div>","hidden":false,"width":"80px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"% BM Dur Con","description":null,"key":"bench_dur_contrib_pct","dataType":"number","template":"<div style='text-align:right' {{if parseFloat(${bench_dur_contrib_pct}) < 0 || (${bench_dur_contrib_pct}).toString() == '-0.00'}} class='grid-negative-number'{{/if}}>${bench_dur_contrib_pct}</div>","hidden":false,"width":"80px","format":"##.00","formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Barclays","description":null,"key":"barclays_rating","dataType":"string","template":"<div style='text-align: left'>${barclays_rating}</div>","hidden":false,"width":"50px","format":null,"formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Moody","description":null,"key":"moody_rating","dataType":"string","template":"<div style='text-align: left'>${moody_rating}</div>","hidden":false,"width":"50px","format":null,"formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"S&P","description":null,"key":"sp_rating","dataType":"string","template":"<div style='text-align: left'>${sp_rating}</div>","hidden":false,"width":"50px","format":null,"formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Fitch","description":null,"key":"fitch_rating","dataType":"string","template":"<div style='text-align: left'>${fitch_rating}</div>","hidden":false,"width":"50px","format":null,"formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Outlook","description":null,"key":"outlook","dataType":"string","template":"<div style='text-align: left'>${outlook}</div>","hidden":false,"width":"50px","format":null,"formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false},{"headerText":"Target Rating","description":null,"key":"target_rating","dataType":"string","template":"<div style='text-align: left'>${target_rating}</div>","hidden":false,"width":"80px","format":null,"formatter":null,"formula":null,"unbound":false,"isFixed":false,"ignoreCustomization":false,"includeHiddenInExport":false}];
debugger; $("#Grid").igHierarchicalGrid({ autoGenerateColumns: false, autoGenerateLayouts: false, animationDuration: 0, height: "680px", width: "100%", autofitLastColumn: false, initialExpandDepth: 1, dataSourceType: "json", dataSource: data, columns: columns, columnLayouts: columnLayouts });
});
$("#exportButton").click( function () { $.ig.GridExcelExporter.exportGrid($("#Grid"), { fileName: "igGrid", worksheetName: "Sheet1", tableStyle: "tableStyleLight13", dataExportMode: "allRows" });});</script>}