jQWidgets Forums

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: Popup Grid Popup Grid #52597

    Ivansh
    Participant

    My issue is solved, I’m using a different ID in the second instance for each grid call $(“#jqxgrid2”).jqxGrid(); and for div id.

    in reply to: Popup Grid Popup Grid #52595

    Ivansh
    Participant

    Me too 🙂
    I have one main grid, and I want to create another instance for second grid on the same page, but the second will be shown in modal window.
    Is it possible to have 2 different grids on the same page?


    Ivansh
    Participant
    I think I've found the solution, I've just put my html code from rowdetailstemplate to the loop:
    
    var dataadapter = new $.jqx.dataAdapter(source, {
        loadComplete: function (data) {
            var datainformation = $("#jqxgrid").jqxGrid('getdatainformation');
            for (i = 0; i < datainformation.rowscount; i++) {
                var hidden = i > 0 ? true : false;
                $("#jqxgrid").jqxGrid('setrowdetails', i, "<div style='margin: 10px;'><ul style='margin-left: 30px;'><li class='title'><li>Description:</li><div class='information'></div><div class='notes'></div></div>", 220, hidden);
            }
        },
        loadError: function(xhr, status, error)    {    alert(error);    }
    });

    Ivansh
    Participant

    I have found that setrowdetails working within the dataAdapter, but it’s not connected to my template and data:

            // set row details.
            $("#jqxgrid").jqxGrid('beginupdate');
            $("#jqxgrid").jqxGrid('setrowdetails', 0, "<div class='tabs0' style='margin: 10px;'><ul style='margin-left: 30px;'><li>Nancy Davolio</li><li>Notes</li><div class='information0'></div><div class='notes0'></div></div>", 200, false);
            $("#jqxgrid").jqxGrid('setrowdetails', 1, "<div class='tabs1' style='margin: 10px;'><ul style='margin-left: 30px;'><li>Andrew Fuller</li><li>Notes</li><div class='information1'></div><div class='notes1'></div></div>", 200, true);
            $("#jqxgrid").jqxGrid('setrowdetails', 2, "<div class='tabs2' style='margin: 10px;'><ul style='margin-left: 30px;'><li>Janet Leverling</li><li>Notes</li><div class='information2'></div><div class='notes2'></div></div>", 200, true);
            $("#jqxgrid").jqxGrid('setrowdetails', 3, "<div class='tabs3' style='margin: 10px;'><ul style='margin-left: 30px;'><li>Margaret Peacock</li><li>Notes</li><div class='information3'></div><div class='notes3'></div></div>", 200, true);
            $("#jqxgrid").jqxGrid('setrowdetails', 4, "<div class='tabs4' style='margin: 10px;'><ul style='margin-left: 30px;'><li>Steven Buchanan</li><li>Notes</li><div class='information4'></div><div class='notes4'></div></div>", 200, true);
            $("#jqxgrid").jqxGrid('setrowdetails', 5, "<div class='tabs5' style='margin: 10px;'><ul style='margin-left: 30px;'><li>Michael Suyama</li><li>Notes</li><div class='information5'></div><div class='notes5'></div></div>", 200, true);
            $("#jqxgrid").jqxGrid('setrowdetails', 6, "<div class='tabs6' style='margin: 10px;'><ul style='margin-left: 30px;'><li>Robert King</li><li>Notes</li><div class='information6'></div><div class='notes6'></div></div>", 200, true);
            $("#jqxgrid").jqxGrid('setrowdetails', 7, "<div class='tabs7' style='margin: 10px;'><ul style='margin-left: 30px;'><li>Laura Callahan</li><li>Notes</li><div class='information7'></div><div class='notes7'></div></div>", 200, true);
            $("#jqxgrid").jqxGrid('setrowdetails', 8, "<div class='tabs8' style='margin: 10px;'><ul style='margin-left: 30px;'><li>Anne Dodsworth</li><li>Notes</li><div class='information8'></div><div class='notes8'></div></div>", 200, true);
            $("#jqxgrid").jqxGrid('resumeupdate');
    

    How to made so it will take my template and data from initrowdetails function?


    Ivansh
    Participant

    I’ve found that it’s possible to put the update Row Details into this function, so it will update on every data update:
    var dataadapter = new $.jqx.dataAdapter(source, {
    loadComplete: function (data) {
    alert(“Update row details”);
    $(‘#jqxGrid’).jqxGrid({ initrowdetails: initrowdetails});
    },
    loadError: function(xhr, status, error) { alert(error); }
    });

    But the code isn’t working, I can’t find any updaterowdetails method in API docs. What else do I need to add to update?


    Ivansh
    Participant

    Hi Peter,
    I have the same issue and only can find old solutions which are not working for me with the new grid version.
    Please provide some code example for current version.
    I need to update Row Details manualy on sort, filter and any other changes.
    Kindest regards,
    Ivan

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