jQWidgets Forums

Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • in reply to: jqxNumberInput iPad issues jqxNumberInput iPad issues #47898

    gaclique
    Participant

    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>
    in reply to: XLS Export: s is null XLS Export: s is null #25349

    gaclique
    Participant

    Yep, had that parameter in as well and still get the error.

    $("#exportExcel").click(function () {
    $("#transcriptGrid").jqxGrid('exportdata', 'xls', 'Transcript');
    return false;
    });
    in reply to: XLS Export: s is null XLS Export: s is null #25278

    gaclique
    Participant

    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>
    in reply to: XLS Export: s is null XLS Export: s is null #25266

    gaclique
    Participant

    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.

    in reply to: Nested grid using Knockout Nested grid using Knockout #24026

    gaclique
    Participant

    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.


    gaclique
    Participant

    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

    in reply to: Test Topic Test Topic #12597

    gaclique
    Participant

    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


    gaclique
    Participant

    Hello 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

Viewing 8 posts - 1 through 8 (of 8 total)