jQWidgets Forums

jQuery UI Widgets Forums Grid Bindingcomplete Event not firing

This topic contains 2 replies, has 2 voices, and was last updated by  sushanth009 13 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Bindingcomplete Event not firing #3770

    sushanth009
    Member

    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..

    Bindingcomplete Event not firing #3778

    Peter Stoev
    Keymaster

    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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Bindingcomplete Event not firing #3792

    sushanth009
    Member

    Got 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..

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

You must be logged in to reply to this topic.