jQWidgets Forums
Forum Replies Created
-
Author
-
July 16, 2015 at 7:33 pm in reply to: Positioning on a page longer than the screen height Positioning on a page longer than the screen height #73831
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>July 16, 2015 at 7:32 pm in reply to: Positioning window in the center of viewport.. Positioning window in the center of viewport.. #73830For 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>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>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>May 29, 2015 at 3:10 pm in reply to: Grid updaterow ends in no server side update Grid updaterow ends in no server side update #71801Thanks 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?
May 22, 2015 at 1:44 pm in reply to: Grid updaterow ends in no server side update Grid updaterow ends in no server side update #71484Please 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.
May 22, 2015 at 1:21 pm in reply to: Grid updaterow ends in no server side update Grid updaterow ends in no server side update #71478For 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?
May 22, 2015 at 9:32 am in reply to: Grid updaterow ends in no server side update Grid updaterow ends in no server side update #71455From 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?
May 21, 2015 at 5:41 pm in reply to: jqxAngular Grid scripts does not fire jqxAngular Grid scripts does not fire #71422The radioboxes checked events are found to be fired, when a test alert is inserted.
What is not run, is the setAlignment function called.
May 20, 2015 at 9:03 pm in reply to: Grid does not render when filterable Grid does not render when filterable #71364The problem was found to be missing references to jqxlistbox.js and jqxdropdownlist.js.
Case closed.
Do you plan for a solution to this in coming release?
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.
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 -
AuthorPosts