On form load i want a select all text in a particular cell value.
Here is my code, and cell is editable by user
ugPayments.ActiveCell = ugPayments.Rows(i).Cells(4)
ugPayments.ActiveCell.Selected =
True
ugPayments.ActiveCell.SelectAll()
But it is throwing me an error saying
Operation cannot be performed when not in edit mode.
I think that you're confusing the Seleted state of a cell with actually selecting the text in the editor. If you want to always select the text when the user enters edit mode you could do something like:
private void ultraGrid1_AfterEnterEditMode(object sender, EventArgs e){ this.ultraGrid1.ActiveCell.EditorResolved.SelectAll();}
If you want to programmatically enter edit mode:
this.ultraGrid1.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode);
-Matt
Thanks! I tried your advice as follows
ugPayments.PerformAction(UltraGridAction.EnterEditMode)
But still I am getting the error 'Operation can not be performed when not in edit mode.'