My form is using a BindingNavigator to drive the UI. When the "+" "addnew" button is pressed I wan't a new row to show up and have that row be the ActiveRow and be ready for input. I've coded the following, but am assuming a more robust way exists. Can someone either confirm my approach or point me in a better direction?
'add a new row using via the bindingsource,
'then find that "added" row to make it the active row and ready for edit/input me.BindingSource1.AddNew() Me.UltraGrid1.Focus() 'assuming the added row must have ended up at the end, where else could it be? Me.UltraGrid1.ActiveRow = Me.UltraGrid1.Rows(Me.UltraGrid1.Rows.Count - 1) Me.UltraGrid1.PerformAction(UltraGridAction.ActivateCell)Me.UltraGrid1.PerformAction(UltraGridAction.EnterEditMode)
Thanks
Hi,
What you have here seems good to me. What do you mean by "more robust?"
"more robust": I didn't know if there was some hidden property like "addedrow" one could set "activerow" to. You've got "selectedrows" so I was wondering if the "addedrow" existed and I didn't know about it.