jQWidgets Forums
Forum Replies Created
-
Author
-
January 15, 2014 at 2:08 pm in reply to: jqxNumberInput iPad issues jqxNumberInput iPad issues #47898
The “change” event could work but it doesn’t trigger immediately until the control loses focus. We have other controls that are binding through knockout based on this value so below is the fix we implemented.
<div class="form-group"> <label for="creditHours">Credits</label> <div id='creditHours' data-bind="jqxNumberInput: {value: Credits, width: '100px', height: '40px', inputMode: numberInputType, spinMode: 'simple', spinButtons: true, spinButtonsStep: .25, min: 0 }"></div> </div>
<script> var numberInputType = 'simple'; var numberInputEvent = 'valuechanged'; if (is_iPad_device()) { numberInputType = 'textbox'; numberInputEvent = 'change'; } $(function () { $('#creditHours').on(numberInputEvent, function (event) { var creditAmt = event.args.value; console.log('credit hours: ' + creditAmt); }); } </script>
Yep, had that parameter in as well and still get the error.
$("#exportExcel").click(function () { $("#transcriptGrid").jqxGrid('exportdata', 'xls', 'Transcript'); return false; });
Below is the code
<script type="text/javascript"> var dataAdapter; var selectedCycle = 0; var selectedConference = ""; $(function () {var source = { datatype: "json", datafields: [ { name: 'ActivityDetailId', type: 'int' }, { name: 'ActivityId', type: 'int' }, { name: 'Name', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'CategoryId', type: 'number' }, { name: 'Credits', type: 'number' } ], data: {UserId: @Model.UserId, CycleId: selectedCycle, Conference: selectedConference}, url: 'GetActivities', id: 'ActivityDetailId', type: 'POST' }; dataAdapter = new $.jqx.dataAdapter(source); $("#transcriptGrid").jqxGrid( { theme: DEFAULT_THEME, width: 900, height: 300, source: dataAdapter, //pageable: false, pageable: true, pagesize: 5, pagesizeoptions : ['5','10','20'], columnsresize: true, filterable: true, sortable: true, showfiltercolumnbackground: false, showsortcolumnbackground: false, autoshowfiltericon: true, showstatusbar: true, statusbarheight: 120, showaggregates: true, columnsheight: 40, autoheight: true, autorowheight: true, selectionmode: 'none', enablehover: false, columns: [ { text: 'Name', datafield: 'Name', width: 100, cellsalign: 'center', align: 'center' }, { text: 'Activity Title', datafield: 'Title', width: 250, cellsalign: 'left', align: 'center' }, { text: 'Credits', datafield: 'Credits', width: 70, cellsalign: 'right', align: 'right', cellsformat: 'F2', aggregates: ['sum', { 'Totals': function (aggregatedValue, currentValue, column, record) { if (record['CategoryId'] == "1" && typeof( currentValue)!='undefined') return parseFloat(currentValue) + parseFloat(aggregatedValue) else if( typeof( aggregatedValue)!='undefined') return parseFloat(aggregatedValue) else return 0 } } ], aggregatesrenderer: function (aggregates, column, element, summaryData) { var renderstring = ""; $.each(aggregates, function (key, value) { renderstring += '<div style="position: relative; margin: 4px; text-align: right; overflow: hidden;">' + value + '</div>'; }); return renderstring; } }, { text: 'Cat', datafield: 'CategoryId', width: 50, cellsalign: 'center', align: 'center', filterable: false } ] });$("#exportExcel").click(function () { $("#transcriptGrid").jqxGrid('exportdata', 'xls'); return false; });});</script><div id='jqxWidget' class='gridstyle' style="margin-top:20px"> <div style="margin-top:20px"> <a href="#" id="exportExcel"><img src="/Images/excel.png" title="Export to Excel" /></a> </div> <div id="transcriptGrid"> </div></div>
I too am having the same issue with exporting to excel. I have initialized the datafields array with name and type but i still get the “s is null” error when exporting. My export was working fine on v 2.8.3 but is no longer working on v 2.9.3.
My grid do include a status bar with aggregates. Not sure if that causes any issues but that’s the only thing i can think of that is different than the previous posters grid declaration.
Added the datafields doesn’t make any difference. I was able to get the data to show correctly by using a cellrenderer like below
var cellsrenderer = function (row, column, value, columnproperties) { var displayValue = value(); return displayValue; }
The issue i have now is that when i make changes to my Knockout model, the content in my nested grid doesn’t update automatic. Seems like it’s not subscribing correctly or something and I have to manually call refreshdata on my grid to have the data update on the UI.
Seems like the nested grid behaves differently from a regular grid when binding to observable array.
December 19, 2012 at 8:06 pm in reply to: IE8 jqx-all.js Memory leak? causing jscript.dll to crash IE8 jqx-all.js Memory leak? causing jscript.dll to crash #12612The issue might be due to how IE8 jscript.dll handles the garbage collection. The jscript.dll version I had on my Windows XP SP3 VM is 5.8.6001.18702. I found the following article http://support.microsoft.com/kb/2632503 which upgrades the dll to version 5.8.6001.23259. After further testing, this version seems to be a little more stable although I’m still able to create the crash.
I’m assuming it was more prominent in the jqx-all because of the large number the objects / variables being created in that one file. Perhaps there is a circular reference or issue in the js library that GC isn’t able to process. Any additional insight into this would be greatly appreciated
The issue might be due to how IE8 jscript.dll handles the garbage collection. The jscript.dll version I had on my Windows XP SP3 VM is 5.8.6001.18702. I found the following article http://support.microsoft.com/kb/2632503 which upgrades the dll to version 5.8.6001.23259. After further testing, this version seems to be a little more stable although I’m still able to create the crash.
I’m assuming it was more prominent in the jqx-all because of the large number the objects / variables being created in that one file. Perhaps there is a circular reference or issue in the js library that GC isn’t able to process. Any additional insight into this would be greatly appreciated
December 19, 2012 at 1:25 pm in reply to: IE8 jqx-all.js Memory leak? causing jscript.dll to crash IE8 jqx-all.js Memory leak? causing jscript.dll to crash #12590Hello Peter,
You might not notice if you only refresh once or twice. Try refreshing up to 20 times…and it’ll cause the browser to crash. It seems as though it slowly corrupting the jscript.dll
-
AuthorPosts