I use Visual C# with Windows Forms.
I need to have a DatagridView Unbounded, with editmode set to EditOnKeystrokeOrF2 and AllowUsersToAddRows to True (defaults) in case the user type something.
But also I need to programmatically replicate the same behavior: "Same as when you start to type something a small icon (a pencil) appears at the left side of the row, and a new row is inserted at the end of the dgv."
Thank you开发者_如何转开发 for your help.
Found the solution:
Instead of adding a new row, i just tell the datagrid that the cell is dirty, and voilá: it enters in edit mode, the small pencil appears and a new uncommitted row appears under it ! :)
this.dataGridViewModificadaDetalle.NotifyCurrentCellDirty(true);
精彩评论