Hi,
Actually issue is that Grid works fine with all kind of paste operation correctly. I have grid with UltraGrid.DisplayLayout.Override.AllowAddNew = AllowAddNew.TemplateOnTop and when a user types in a field the new row is moved to the main grid with the row still showing IsAddRow = true. Similar when we change the row after supplying the values to the cells and move to the next row.
Now, I want the same scenario that when I paste the values into a cell that is in the Add Row (TemplateOnTop) using the Ctrl-V this does not move the new row to added row that it does not behave like behave the same as the above scenario does. I am here to get a way how to achieve this that when we paste data to the cell and grid move to the next row grid should add row to main grid from templateRow.
I am trying to find a way to make the grid behave the same way by forcing the grid to add the row like it does when the user types in the cell.
There's no reason why typing into a cell should be any different than pasting into a cell in this regard.
I tried this out and it works just fine for me, either way. What version of the grid are you using? Maybe this is a bug in an old version and you just need to get the latest service release: How to get the latest service release - Infragistics Community
Mike,
there is some confusion there or I am not able to explain the issue clearly. Grid works fine with the standard Ctrl+V processing since all it is standard code. but since we have implemented our own code snippet to handle ctrl+V which is not working fine with this case.
My main question is how can I get that behavior to occur by my code causing that to occur. Is there a way to get a record to insert the same way by using code? I want to know the similar functionality how I can implement using my own code snippet. Please let me know
Oh, I see. So your code is setting the value of the cells directly?
If you are doing this via the Value property of the cell, then you might try using the SetCellValue method on the cell, instead. This method acts as though the user changed the cell, so I think it will do what you want.
If I am wrong about that, then the next option would be to set the AddRowModifiedByUser property on the rows collection to true. That will explicitly tell the grid to act as through the template add row was modified by user action.