jQWidgets Forums
jQuery UI Widgets › Forums › Grid › using jqxgrid inside the jqxwidow
This topic contains 1 reply, has 2 voices, and was last updated by ivailo 10 years, 1 month ago.
-
Author
-
I’m using jqxgrid inside the jqxwidow,
Here my code,,
function publisherDetails(row){
//view publishers details -> using subAgreement id from CapAgreement table and get the souce name from MasterSource tablevar subAgreementId = $(“#jqxgrid”).jqxGrid(‘getcellvalue’, row, “lca_subAgreement”);
var source = {
datatype: “json”,
datafields: [
{ name: ‘lcms_lliSourceID’, type: ‘number’ },
{ name: ‘lcms_hierarchyID’, type: ‘string’ },
{ name: ‘lcms_source’, type: ‘string’ }
],cache: false,
url: ‘index.php?rt=login/getPublishersDetails/’+subAgreementId,
updaterow: function (rowid, rowdata, commit) {
commit(true);
}
};
var dataAdapter = new $.jqx.dataAdapter(source);var grid = $(“#publisherDetails”).jqxGrid(
{
width: 750,
height: 560,
source: dataAdapter,
pageable: true,
pagesize: 20,
showfilterrow: true,
columns: [
{ text: ‘First Name’, dataField: ‘lcms_source’, width: 250 },
{ text: ‘Last Name’, dataField: ‘lcms_source’, width: 250 },
{ text: ‘Product’, dataField: ‘lcms_source’, width: 250 }
]
});//viewpublisherDetailsIcon the demo
$(“#viewpublisherDetailsIcon”).jqxWindow({
width: “auto”,
height: “auto”,
minWidth: 750,
minHeight: 560,
isModal: true,
autoOpen: false,
modalOpacity: 0.01,
initContent: function () {
grid
}
});$(“#subagreement”).text(subAgreementId);
var x = ($(window).width() – $(“#viewpublisherDetailsIcon”).jqxWindow(‘width’)) / 2 + $(window).scrollLeft();
var y = ($(window).height() – $(“#viewpublisherDetailsIcon”).jqxWindow(‘height’)) / 2 + $(window).scrollTop();
$(“#viewpublisherDetailsIcon”).jqxWindow({ position: { x: x, y: y} });
$(“#viewpublisherDetailsIcon”).jqxWindow(‘open’);}
Now the problem is, if i choose pages size 5,10,20, it shows below error..,
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.
Thanks,
MuthuHi Muthu,
From this part of code is dificult to see the reason about this error.
In code below you call a variable. Must be a function:
initContent: function () { grid }
Best Regards,
Ivailo IvanovjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.