Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
set focus in first cell of 'AddRow' in UltraGrid
posted
Hi,                I have been struggling with what I think should be a relatively simple task.  I am trying to programmatically apply focus to the first cell in the ‘addrow’ of an empty UltraGrid with the following property set:       THIS-OBJECT.ultraGrid1.DisplayLayout.Override.AllowAddNew = Infragistics.Win.UltraWinGrid.AllowAddNew.FixedAddRowOnTop. I can make it work if the grid has some data in it, but when it is empty I have been playing with code like below with no luck:     

        ultraGrid1.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.FirstCellInGrid).

        ultraGrid1.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.entereditmode).

 And:       ultraGrid1.ActiveRow = ultraGrid1.rows[0].  // trying to set ActiveRow to the AddRowOnTop…      ultraGrid1.ActiveRow.cells["paymentType"].activate().  // paymentType is the name of the column Any guidance would be much appreciated.