jQWidgets Forums
Forum Replies Created
-
Author
-
November 3, 2019 at 11:47 am in reply to: Grid does not refresh on window resize Grid does not refresh on window resize #107228
The grid and window don’t follow the browser window size.
This fixed it for me:$(window).bind(‘resize’, function () {
$(“#jqxgrid”).jqxGrid(‘width’,$(window).width());
$(“#jqxwindow”).jqxWindow(‘width’, $(window).width());
$(“#jqxgrid”).jqxGrid(‘updatebounddata’, ‘cells’); //refresh screen
}).trigger(‘resize’);The problem was the window and grid weren’t being resized to the browser window size.
So I copied browser window width to jqxgrid and jqxwindow and that fixed the problem.December 6, 2018 at 5:47 pm in reply to: After delete row page back to first page After delete row page back to first page #103091I am not sure what I have done but it is now working ok.
Another problem I found with column width not changing suddenly just fixed itself !!
Must be a cache or refresh problem.December 6, 2018 at 3:32 pm in reply to: After delete row page back to first page After delete row page back to first page #103088If I don’t do updatebounddata the screen is out of date.
If I do updatebounddata the screen is correct but it always goes back to page 0.
The code just goes away and deletes the rows in the database.`
//////////////////////////////
// delete rowdeleterow: function (rowid, commit) {
var cx;
for (cx = 0; cx < rowid.length; cx++) {$.ajax({
url: ‘@Url.Action(“deleterow”, “Home”)’,
type: ‘POST’,
contentType: ‘application/json;’,
data: JSON.stringify({
id2: rowid[cx]
}),success: function (valid) {
$(“#jqxgrid”).jqxGrid(‘updatebounddata’, ‘data’);
commit(true);
},
error: function () {
alert(‘error!’);
}
});
}
}December 5, 2018 at 5:34 pm in reply to: After delete row page back to first page After delete row page back to first page #103069I have done as you suggested but it still goes to page 0.
I event tried using the bind event to goto a page but that doesnt work either.
The problem seems to be the deleterow is an asynchronous event and returns before it has done anything causing the page to always be zero.
I tried making the event synchronous but that made no difference.If I make a button that goes to page 0 that works fine, I just cant get it to do it after a deleterow or addrow event.
November 26, 2018 at 12:29 pm in reply to: Problems with widgets in mvc Problems with widgets in mvc #102907It doesn’t work on my pc.
I copied the last part of that page into my view called test.
It doesn’t display anything.
It seems odd my code runs ok in _layout.cshtml but not in index.cshtml
If I run my own code then the .ready functions are called ok but the calls to make the button is not. save1 is displayed but save2 isn’t.
`
<script type=”text/javascript”>
$(document).ready(function () {
alert(‘save1’);
// Create save Button.
$(“#jqxButtonSave”).jqxButton({ width: ‘180’, height: ’25’ });
alert(‘save2’);
// Subscribe to Click events.
$(“#jqxButtonSave”).on(‘click’, function () {
alert(‘save3’);});
});
</script> -
AuthorPosts