I have a XamGrid (2011.2) which when it is in edit mode, and a user navigates to a certain cell, I need to provide an assist. I need to be able to automatically select the existing contents so that they can just start typing to erase the old content.
What I need is something similar to this, except that I need to get access to the textblock contained in the cell. The cell has no such property SelectAll. This is the approach I would use if it was a straight TextBox. Any ideas on this?
Private Sub dgDataEntry_CellEnteringEditMode(sender As Object, e As Infragistics.Controls.Grids.BeginEditingCellEventArgs) Handles dgDataEntry.CellEnteringEditMode Me._intDataEntryIndex = e.Cell.Row.Index Select e.Cell.Column.Key.ToLower() Case "orgabbrvcd" Dim tb As Cell = sender tb.SelectAll() End Select End Sub
sorry, that one line of code should be
dim tb as Cell = e.Cell
HI,
Change the XamGrid's editor settings.
<ig:XamGrid.EditingSettings> <ig:EditingSettings AllowEditing="Hover"/> </ig:XamGrid.EditingSettings>
Click on the XamGrid and mouse over any cell, it will get selected and be in edit mode.
Sincerely,
Matt Developer Support Engineer