Author Topic: Paste In Grid  (Read 1652 times)

cijojohn

  • Pro Ultimate
  • Jr. Member
  • *
  • Posts: 73
    • View Profile
Paste In Grid
« on: July 20, 2017, 06:11:53 pm »
Hello Team,

I am facing Issue with paste in grid.

when i try to paste multiple rows and i go to last row of grid and paste then it is creating new rows.  I want to restrict that.

see attachment.

Please Help..

Thanks


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Paste In Grid
« Reply #1 on: July 20, 2017, 10:30:09 pm »
It's the default behavior which can be customized with beforeValidate event:

Code: [Select]
          beforeValidate: function(evt, ui){
                if(ui.source=="paste"){
                    ui.rowList = ui.rowList.filter(function(rObj){
                        return (rObj.type!=="add");                   
                    })
                }
          }