Author Topic: Adding the row dynamically in the dialogue grid pop up  (Read 3137 times)

bsolteam

  • Pro Deluxe
  • Full Member
  • *
  • Posts: 107
    • View Profile
Adding the row dynamically in the dialogue grid pop up
« on: December 06, 2014, 03:53:00 pm »
HI team,
                I am adding the new row dynamically with some data in the cell for the pop-up grid. But it is adding the empty row with no data are added. This was working fine with the param query javascript version 2.2. Now I replaced the with new version to 2.3 js file.
This problem i was facing .Please help me out to resolve this issue.


Here is my sample code what i am doing.

                                                                  for (var i = 0; i < cutType.length; i++) {
                        if (cutType == "J") {
                           cutType = "Joining";
                        }

                        else if (cutType == "L") {
                           cutType = "Leaving";
                        }
                        var rowData = {
                           vslId : cutvslId,
                           pvslName : cutVessel,
                           peventType : cutType,
                        };
         
                        $("#popup_grid").pqGrid("addRow", {
                           rowData : rowData
                        });
                        
                        
                        $("#popup_grid").pqGrid("refreshRow", {
                              rowIndx : i
                           });
                        
                     }


Thanks in Advance

Bsol Team

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Adding the row dynamically in the dialogue grid pop up
« Reply #1 on: December 08, 2014, 04:30:09 pm »
addRow works the same in 2.3.0 as in this demo: http://paramquery.com/pro/demos/editing_batch

Possible reasons for addRow resulting in an empty row could be uneditable cells or invalid data ( validations ). You could pass checkEditable: false to addRow method if you don't want to check editability of cells during add row operation.
« Last Edit: December 08, 2014, 05:19:24 pm by paramquery »