Author Topic: Add new row beneath drop row and apply format  (Read 5293 times)

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Add new row beneath drop row and apply format
« Reply #15 on: April 16, 2020, 05:19:33 pm »
1. This doesn't work with grouped rows.

Code: [Select]
var ri = $gridRes.pqGrid('addRow', {
                  newRow: {
                    proj: uiDrag.rowData.proj,
                    grp: uiDrag.rowData.grp,
                    pq_rowstyle: {
                      background: "#ff0000"
                    }
                  },
                  //rowIndx: uiDrop.rowIndx,
                });

                $gridRes.pqGrid('scrollRow', {
                  rowIndxPage: ri
                }, function(){
                //debugger;
                  $gridRes.pqGrid('focus', {
                    rowIndxPage: ri,
                    colIndx: 1
                  });               
                });


2. This makes the whole row draggable.

Code: [Select]
clsHandle: 'pq-grid-row',

https://jsfiddle.net/rt8gn1f9/