Hi Mike!
Can you please tell me how I can move the focus FROM the grid after inserting a new row ...There should be NOTHING selected inside the Grid after I've inserted the row ... the Grid shouldn't even be selected itself
I've tried various things and various events:( e.g. AfterRowUpdated, AfterCellUpdated etc.... )
including:_ugFinishDateChanges.Selected.Cells.Clear();_ugFinishDateChanges.Selected.Rows.Clear();and then right after:_btnDelay.Focus(); // this is a button, OUTSIDE of the Grid
But there is still one cell selected/activated ...
I was looking for something like: _ugFinishDateChanges.ActiveCell.Clear(); // this property does NOT exist though ...I would think that everything inside the grid would be UNSELECTED/UnFocused simply by moving the focus to the button, which is NOT on the Grid ?How come there's one cell ( the last cell I was in ) still "selected" ? The focus is now on the BUTTON, not the Grid ( correctly so )I should note that I'm using this in the InitilizeLayout:
e.Layout.Override.AllowMultiCellOperations = Infragistics.Win.UltraWinGrid.
AllowMultiCellOperation.None;e.Layout.Override.SelectTypeCell = Infragistics.Win.UltraWinGrid.SelectType.Single;e.Layout.Override.SelectTypeRow = Infragistics.Win.UltraWinGrid.SelectType.Single;I should also note that the focus DOES move to the button, but the cell I was in, inside the Grid is still "selected" too ( gray colored ). I want the Grid completely "CLEAN" ( no selections inside it )And when I push that button, another cell becomes actived ( which is the correct behaviour )because this button enters "edit mode" ( creates a new blank row in the datasource and rebinds the data with it ):_ugFinishDateChanges.ActiveRow = _ugFinishDateChanges.Rows[0]; // this is working OK_ugFinishDateChanges.Selected.Cells.Add(_ugFinishDateChanges.Rows[0].Cells["FinishDate"]); // this is working OK
Use can leave a code as follows
ultragrid.ActiveRow=null;
ultragrid.SelectedRow=null;
ultragrid.ActiveCell=null;
That worked ... setting the ActiveRow and ActiveCell as null ... thanx
But there's no SelectedRow property ... you can use ultragrid.Selected.RowS[0] I guess ? Dunno if you can null that, I didn't even try
Doesn't matter, the ActiveRow and ActiveCell did the trick ;-)
Thanx,EE