jQWidgets Forums

Forum Replies Created

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

  • Ivalde
    Participant

    For the window always to be positioned in screen center, when scrolled or not ecrolled, set the window div style to the following:

    style=”position: fixed; left: 50%; top: 50%;”

    Here is a complete example in which the winMsgTxt is set in runtime:

    <div id=”winMsg” style=”position: fixed; left: 50%; top: 50%;”>
    <div>
    <div id=”winMsgTxt”></div>
    <div>
    <div style=”position: absolute; bottom: 10px; right: 10px; margin-top: 10px;”>
    <input type=”button” id=”btnMsgOk” value=”OK” /><input type=”button” id=”btnMsgCancel” value=”Cancel” />
    </div>
    </div>
    </div>
    </div>


    Ivalde
    Participant

    For the window always to be positioned in screen center, when scrolled or not ecrolled, set the window div style to the following:

    style=”position: fixed; left: 50%; top: 50%;”

    Here is a complete example in which the winMsgTxt is set in runtime:

    <div id=”winMsg” style=”position: fixed; left: 50%; top: 50%;”>
    <div>
    <div id=”winMsgTxt”></div>
    <div>
    <div style=”position: absolute; bottom: 10px; right: 10px; margin-top: 10px;”>
    <input type=”button” id=”btnMsgOk” value=”OK” /><input type=”button” id=”btnMsgCancel” value=”Cancel” />
    </div>
    </div>
    </div>
    </div>

    in reply to: Positioning a window Positioning a window #73829

    Ivalde
    Participant

    For the window always to be positioned in screen center, when scrolled or not ecrolled, set the window div style to the following:

    style=”position: fixed; left: 50%; top: 50%;”

    Here is a complete example in which the winMsgTxt is set in runtime:

    <div id=”winMsg” style=”position: fixed; left: 50%; top: 50%;”>
    <div>
    <div id=”winMsgTxt”></div>
    <div>
    <div style=”position: absolute; bottom: 10px; right: 10px; margin-top: 10px;”>
    <input type=”button” id=”btnMsgOk” value=”OK” /><input type=”button” id=”btnMsgCancel” value=”Cancel” />
    </div>
    </div>
    </div>
    </div>

    in reply to: Window position fixed Window position fixed #73828

    Ivalde
    Participant

    For the window always to be positioned in screen center, when scrolled or not scrolled, set the window div style to the following:

    style=”position: fixed; left: 50%; top: 50%;”

    Here is a complete example in which the winMsgTxt is set in runtime:

    <div id=”winMsg” style=”position: fixed; left: 50%; top: 50%;”>
    <div>
    <div id=”winMsgTxt”></div>
    <div>
    <div style=”position: absolute; bottom: 10px; right: 10px; margin-top: 10px;”>
    <input type=”button” id=”btnMsgOk” value=”OK” /><input type=”button” id=”btnMsgCancel” value=”Cancel” />
    </div>
    </div>
    </div>
    </div>


    Ivalde
    Participant

    Thanks for the tip on how to receive the server side auto incremental Id.

    The addrow function does now operate as expected.

    For the grid data insertion, update and delete operations in general, I would now like to receive the possible server side MySQL failure message, to let the client side user know from a popup message then what’s going wrong server side.

    For the addrow function and the success function, I have included the commit(true, data.Id); and for the error function, I have included commit(false);

    For the grid data operation, I have the following code as an example for the data insertion:

    if (isset($_GET[‘insert’])) {
    $insert_query = “INSERT INTO stbl_Domains (Domain) SELECT (”)”;
    $result = mysql_query($insert_query) or die(“SQL Error 1: ” . mysql_error());
    if ($result) {
    echo json_encode(array(‘Id’ => mysql_insert_id()));
    }
    }

    How to let that possible server side mysql_error() be included in the callback and presented in a client side popup?


    Ivalde
    Participant

    Please note the server side table has an auto incremental Id column.

    I believe this can make the challenge, as that Id for the new row has to be bound client side before the new client side inserted data can then be catched server side.


    Ivalde
    Participant

    For this CRUD based grid I have now included a button for a new row to be inserted, which then calls this function:

    $(“#addrowbutton”).bind(‘click’, function () {
    var row = {};
    $(“#jqxgrid”).jqxGrid(‘addrow’, null, row);
    $(“#jqxgrid”).jqxGrid(‘refreshdata’);
    });

    This mechanism results in a new empty row inserted both client side and server side.

    For the new row data to be inserted (updated) however (ie. updaterow), the grid has to be complete refreshed (F5) before the data can be inserted client side and then catched server side.

    The $(“#jqxgrid”).jqxGrid(‘refreshdata’); was then inserted in the above code for the grid to be refreshed, with no success. The refresh method and the updatebounddata method results in no success either. These methods was then run in a button call, for a refresh button to be called just after the new row inserted, with no success. When data is inserted client side, it’s not cathed server side. The F5 refresh fix it all.

    Is the dataAdapter usage the reason for the missing refresh?


    Ivalde
    Participant

    From that CRUD Web App tutorial I have now managed to let the edited cells be updated server side also.

    Thanks for the tip!

    I did belive the dataAdapter did the auto insert, auto update and auto delete. Is it planned to let the dataAdapter do that in the next versions? So that we do not need to include all these functions per jqxGrid?

    For the PHP SQL queries file in general, do we need to include one such file per widget? Or is it possible to let the SQL queries for all the widgets be placed in a single PHP file?


    Ivalde
    Participant

    The radioboxes checked events are found to be fired, when a test alert is inserted.

    What is not run, is the setAlignment function called.


    Ivalde
    Participant

    The problem was found to be missing references to jqxlistbox.js and jqxdropdownlist.js.

    Case closed.

    in reply to: Window focus setting Window focus setting #17984

    Ivalde
    Participant

    Do you plan for a solution to this in coming release?

    in reply to: Window focus setting Window focus setting #17649

    Ivalde
    Participant

    Is there no solution to this with the existing software?

    That means, whenever we would like a runtime content change, the button is missed as it belongs to the original contents now changed?

    Please confirm whether there is no solution.

    in reply to: Window focus setting Window focus setting #17497

    Ivalde
    Participant

    Dimitar,

    Thanks a lot for the solution to this.

    For this window with this OK button, I have another question also:

    The window is to be opened when an ajax data update request is completed, for the user to be known to the completion. The window open event is then set to:

    $(‘#jqxWindow’).on(‘open’, function (event) {
    $(‘#jqxBtnOK’).focus()
    });

    So long so good, it does operates correct.

    However, whenever I would like to manipulate the window content for the completion msg, the okButton disappears. The code for the window content manipulation together with the window opening is set to:

    $(‘#jqxWindowOK’).jqxWindow({ content: “Detaljene er oppdatert” });
    $(‘#jqxWindowOK’).jqxWindow(‘open’);

    What then happen is that window button is gone… and I’m lost…

    Best regards,
    Ivalde

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