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
Ah, I see. No, there's nothing like that. There's a TemplateAddRow property on the Rows collection, but the row you are dealing with here is not a TemplateAddRow, it's a regular AddRow.
Actually, now that you mention this, adding an AddRow property to the rows collection is a really good idea. Feel free to Submit a feature request to Infragistics and maybe we can add this in a future release.
"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.
Hi,
What you have here seems good to me. What do you mean by "more robust?"