jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Bindingcomplete Event not firing
Tagged: Binding complete event
This topic contains 2 replies, has 2 voices, and was last updated by sushanth009 13 years ago.
-
Author
-
I am trying to build nested grid view for which I am defining the ‘bindingcomplete’ event. But the event semms to not fire for some unknown reason. It have checked the console in firebug for errors, but could not find any. Can someone look into it..
Also when I explicitly set the setrowdetails it seems to work.. This is my example…// This does not work..
$('#invgrid').jqxGrid(
{
width: 800,
autoheight: true,
source: dataAdapter,
pageable: true,
rowdetails: true,
initrowdetails: initrowdetails,
columns: [ // Column names
{ text: 'Prop', datafield: 'PropertyCode', editable: false, width: 90 },
{ text: 'Account Number', datafield: 'AccountNumber', editable: false, width: 90 },
{ text: 'Service Start', datafield: 'ServiceStart', editable: false, width: 90}
]
});// This event is not firing....
$("#invgrid").bind("bindingcomplete", function(event) {
alert('Binded'); // This alert not being fired..
if (event.target.id == "invgrid") {
$("#invgrid").jqxGrid('beginupdate');
var datainformation = $("#invgrid").jqxGrid('getdatainformation');
for (i = 0; i 0 ? true : false;
var hidden = true;
$("#invgrid").jqxGrid('setrowdetails', i, "", 220, hidden);
}
$("#invgrid").jqxGrid('resumeupdate');
}
});But when I explicitly define the setrowdetails.. It works..
$('#invgrid').jqxGrid(
{
width: 800,
autoheight: true,
source: dataAdapter,
pageable: true,
rowdetails: true,
initrowdetails: initrowdetails,
columns: [ // Column names
{ text: 'Prop', datafield: 'PropertyCode', editable: false, width: 90 },
{ text: 'Account Number', datafield: 'AccountNumber', editable: false, width: 90 },
{ text: 'Service Start', datafield: 'ServiceStart', editable: false, width: 90}
]
});$("#invgrid").jqxGrid('beginupdate');
$("#invgrid").jqxGrid('setrowdetails', 0, "", 200, true);
$("#invgrid").jqxGrid('setrowdetails', 1, "", 200, true);
$("#invgrid").jqxGrid('resumeupdate');
Can you let me know where I am going wrong..
Hi sushanth009,
The ‘bindingcomplete’ event is raised when the binding operation is completed. From your code, I see that you are binding to this event after the Grid’s initialization so it is possible at that point the binding to be already completed. I suggest you binding to that event before the Grid’s initialization.
Best Wishes,
Peter StoevjQWidgets Team
http://www.jqwidgets.comGot it.. I thought I can bind it after the grid is initialized.. Once i moved the event before the Initialization it is working fine.. thanks..
-
AuthorPosts
You must be logged in to reply to this topic.