Hi,
I would like to have an add new row at the top of the grid. I've done that by setting override.allowaddnew to FixedAddRowOnTop. But I would also like to have the new row be added to the bottom after the user presses Enter, so that all items appear in the order that were entered. I was able to do this with moving rows grid.Rows.Move in the AfterInsertRow event, but it only worked for grids with 1 Band. If I've a master/detail tables displayed in the grid, moving rows didn't work, in particular the addnewrow appeared at the bottom.
Has anyone any idea how can this be made possible?
Thanks
I don't think you can fix rows in a child band to the top of the grid. But you could use set AllowAddNew to TemplateOnTop, then the add row will appear at the top of each row island. This property is on the Override. So you could even use FixedAddRowOnTop for the root band and then TemplateOnTop for every other band.
When moving the row for the child bands, you cannot use grid.Rows.Move, since the child rows do not belong to the grid.Rows collection - they are in separate collections. So you need to move the row within the appropriate collection. What I would do is use e.Row.ParentCollection.Move(). That way you don't have to worry about it.