StrataFrame Forum

Adding a new record to an UltraGrid problem

http://forum.strataframe.net/Topic15774.aspx

By Aaron Young - 4/19/2008

I have an UltraGrid bound to a Business Binding Source on a SF Maintenance Form. When I click on the New toolbar button, a new record is added to the bottom of the grid but the active record is set to the record at the top. This means a user would have to click on the new record before entering details.

For comparison, if I enable the AddNewBox on the UltraGrid itself, it will add a new record to the bottom and also make the new record the active row. Is there an easy way of doing this with the form New toolbar command?

Thanks in advance.

By Ivan George Borges - 4/19/2008

Hi Aaron.

If this is not the best practice, I'm sure I will be corrected, but try adding this code to your BO AfterAddNew event:

Private Sub MyBO_AfterAddNew(ByVal e As System.EventArgs) Handles MyBO.AfterAddNew
    Me.MyUltraGridName.Refresh()
End Sub

Cheers.