Forum Replies Created

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts

  • RobWarning
    Participant

    The environment of my production server is a webwiz re-seller hosting platform (see https://www.webwiz.net/ )
    A simplified example is hard to give because I do not know where the problem is, and as stated on my development machine it works fine.
    I could provide you with a link to the page, but then I would have to give you a password also. and since this is a public forum …

    I will rebuild the entire page step by step and see if and where it gets faulty again.

    regards,
    Rob


    RobWarning
    Participant

    Hi Hristo,

    Sorry for my late reaction in your answer. Busy busy busy..
    The problem is still there, on my developer pc under VS it works fine.
    as soon as I deploy to my production environment the dragging fails on this page.
    I have an other page with a jqxSortable on a table that works just fine.

    The initialization of my jqxlistbox widget happens only once as you can see in my code.
    I have checked the console window but I don’t see any errors.
    And the jqxdragdrop.js is definitely included.

    I have added following code to my .js file:

     $('#UsersList').on('dragStart', function (event) {
            console.log(event);
        });

    from my developer pc I can see the event in my console window.
    on the production machine it douse not get triggered


    RobWarning
    Participant

    I have tried this:

    createeditor: function (row, cellvalue, editor, celltext, cellwidth, cellheight) {
                        var dataSource;
                        dataSource = [ 'Tentative', 'Nieuw', 'Approved','Deleted', 'Processed' ];
                        editor.jqxDropDownList({ source: dataSource });
                        editor.jqxDropDownList.on('select', function () {
                            alert('end editing');
                        });
                    }

    But the alert will not trigger. maybe I am binding the event on a wrong way?

    also this has no effect:

     createeditor: function (row, cellvalue, editor, celltext, cellwidth, cellheight) {
                        var dataSource;
                        dataSource = [ 'Tentative', 'Nieuw', 'Approved','Deleted', 'Processed' ];
                        editor.jqxDropDownList({
                            source: dataSource,
                            select: function () {
                                alert('end editing');
                            }
                        });
                    }
    • This reply was modified 1 year, 1 month ago by  RobWarning.

    RobWarning
    Participant

    some additional information I just noticed:
    – if I open the console window after the page has loaded. I can set and clear filters to my grid without problems.
    – I open and close some grid details, still nothing shows in the console window.
    – but when I set or clear a filter now. the filter seems to work fine but in my console window I get the fault message:
    jqxGrid: The data is still loading. When the data binding is completed, the Grid raises the 'bindingcomplete' event. Call this function in the 'bindingcomplete' event handler.
    And the grid details stop working.


    RobWarning
    Participant

    I found it myself,
    first I forgot the source datatype variable.

    so my source is now:
    var source = {
    datatype: ‘json’,
    datafields: [
    { name: ‘Id’, type: ‘string’ },
    { name: ‘Naam’, type: ‘string’ },
    { name: ‘UserId’, type: ‘string’ },
    { name: ‘MutationType’, type: ‘string’ }
    ],
    url: url,
    id: ‘Id’
    };

    the the url string I changed to: var url = ‘../Mutations/Index?handler=Records’;

    and now my server gets called.


    RobWarning
    Participant

    I have found the problem to be a timing issue.
    if I have my cshtml like this:

    <body>
        <h1>Test jqwidgets</h1>
        <div id="Mywindow" class="dialog">
            <div id="windowHeader">Header</div>
            <div id="windowContent">
                MyContent<hr />
                <div class="inline">
                    <label for="MyInput1">input1</label>
                    <div id="MyInput1"></div>
                </div>
                <div class="inline">
                    <label for="MyInput2">input2</label>
                    <div id="MyInput2"></div>
                </div>
            </div>
        </div>
        <button id="MyButton">click</button>
    
    </body>

    and my js like this:

    $(document).ready(function () {
        
        $('#MyButton').click(function () {
            $('#Mywindow').jqxWindow('open');
            $('#MyInput1').jqxDateTimeInput('setDate', '2014, 5, 15');
        });
    
        $('#Mywindow').jqxWindow({
            autoOpen:false,
            position: { x: 100, y: 100 },
            width: 300,
            height: 200,
            showCollapseButton: true,
            maxHeight: 400,
            maxWidth: 700,
            minHeight: 200,
            minWidth: 200,
            initContent: function () {
                $('#MyInput1').jqxDateTimeInput({
    
                });
                $('#MyInput2').jqxDateTimeInput({
                });
            }
        });
    });

    The date will not set!

    if I put a slight delay after the window open it works ok:

    $(document).ready(function () {
        
        $('#MyButton').click(function () {
            $('#Mywindow').jqxWindow('open');
            setTimeout(setDate, 1000);
        });
    
        
        var setDate = function () {
            $('#MyInput1').jqxDateTimeInput('setDate', '2014, 5, 15');
        };
    
        $('#Mywindow').jqxWindow({
            autoOpen:false,
            position: { x: 100, y: 100 },
            width: 300,
            height: 200,
            showCollapseButton: true,
            maxHeight: 400,
            maxWidth: 700,
            minHeight: 200,
            minWidth: 200,
            initContent: function () {
                $('#MyInput1').jqxDateTimeInput({
    
                });
                $('#MyInput2').jqxDateTimeInput({
                });
            }
        });
    });

    I think this is a bug in the jqwidgets DateTimeInput.
    But I hope it will serve others.


    RobWarning
    Participant

    sorry the last part of the message should be:

    $(‘#van’).jqxDateTimeInput(‘setDate’, “2018, 10, 2”);
    $(‘#tot’).jqxDateTimeInput(‘setDate’, “2019, 2, 3”);
    $(‘#sickWindow’).jqxWindow(‘open’);

    I also try to put the jqxwindow(‘open’) line first. but at no succes.


    RobWarning
    Participant

    Hi Todor,

    Sorry for my late reaction.
    It turned out that asp.net core applications have different script settings for development and deploy.
    in deploy my Jquery.js file was not included. resulting in not rendering JQwidgets.
    Now everything works fine. fantastic to work with this fantastic set of jqwidgets tools!


    RobWarning
    Participant

    Very proud to solve this myself…
    following code works:

     for (i = 1; i <= duration; i++) {
                firstDate = firstDate + 1000 * 60 * 60 * 24; //Add one day to the date.
                $('#scheduleTable').append('<tr><td> ' + i + ' </td><td>' + $.format.date(firstDate, 'ddd dd/MM/yyyy') + '</td><td><div class="shiftdd" id="shiftdd' + i + '"></div> </td></tr>'); //Add a table row
                $('#shiftdd' + i).jqxDropDownList({ source: Shifts, placeHolder: "Select shift", displayMember: 'text', width: '120px', height: '25px' }); //Create the dropdownList
                //Set the validation for this dropdownlist to the rules collection.
                (function (index) {  //put it in a immediately-invoked function expression
                    rules.push({
                        input: '#shiftdd' + [index], message: 'Select a shift', action: 'select', rule: function () {
                            var indexe = $('#shiftdd' + [index]).jqxDropDownList('getSelectedIndex');
                            if (indexe < 0) { return false; }
                            else { return true; }
                        }
                    });
                })(i);  //this (i) is important!!!
            }
            console.log(rules);
    in reply to: asp net core 2.2 tag helpers asp net core 2.2 tag helpers #104400

    RobWarning
    Participant

    Hristo,
    sorry for my late reply. indeed the Ctrl – Space combination did the trick.
    thanks.

    Rob

    in reply to: InitContent reset InitContent reset #98753

    RobWarning
    Participant

    Ok this was a rather stupid question. I should simply use the open event to load the dynamic content.


    RobWarning
    Participant

    This is indeed solving the problem! thank you Peter.


    RobWarning
    Participant

    Thanks Peter,

    May be something for a future update?

    Regards
    Rob

    in reply to: Binding jqTree to viewModel Binding jqTree to viewModel #90225

    RobWarning
    Participant
    in reply to: Binding jqTree to viewModel Binding jqTree to viewModel #90224

    RobWarning
    Participant

    Hi peter,
    I think I was not clear enough. The problem I had was to get the Json data from my controller in to my jqxTree inside the view. The initialization was not a problem.
    In the meantime I found a very good example at:
    This is working with MVC 5 as well.

    Best regards and a happy 2017
    Rob

Viewing 15 posts - 1 through 15 (of 17 total)