This question is locked. New answers and comments are not allowed.
Hi Team,
I want to selectAll value in the Edit template textbox while tabbed to it for edit , I tried the below code and then cell is getting highlight on tabbing through that but the text is not selecting for edit .
I tried to make the textbox text inside the edit template to selectAll when it is getting focussed, but the GotFocus event for the textbox is not getting call while tabbing to it.
I want to selectAll value in the Edit template textbox while tabbed to it for edit , I tried the below code and then cell is getting highlight on tabbing through that but the text is not selecting for edit .
I tried to make the textbox text inside the edit template to selectAll when it is getting focussed, but the GotFocus event for the textbox is not getting call while tabbing to it.
| <RadGrid:GridViewDataColumn IsVisible="True" |
| UniqueName="XX"> |
| <RadGrid:GridViewDataColumn.CellTemplate> |
| <DataTemplate> |
| <TextBlock x:Name="tbk" |
| Text="{Binding Balance, Converter={StaticResource CurrencyConverter}, ConverterParameter=False}" /> |
| </DataTemplate> |
| </RadGrid:GridViewDataColumn.CellTemplate> |
| <RadGrid:GridViewDataColumn.CellEditTemplate> |
| <DataTemplate> |
| <TextBox x:Name="txt" |
| BorderThickness="0" |
| MaxLength="13" |
| GotFocus="EditCellGotFocus" |
| Background="Transparent" |
| Padding="0,0,0,0" |
| IsReadOnly="{Binding ImportSourceType, Converter={StaticResource boolToReadOnlyConverter}, Mode=OneWay}" |
| Text="{Binding Balance, Mode=TwoWay}" /> |
| </DataTemplate> |
| </RadGrid:GridViewDataColumn.CellEditTemplate> |
| </RadGrid:GridViewDataColumn> |
Private Sub rgvSA_CurrentCellChanged(ByVal sender As System.Object, ByVal e As Telerik.Windows.Controls.GridViewCurrentCellChangedEventArgs)
Me.rgvSA.BeginEdit()
e.NewCell.Focus()
DirectCast(DirectCast(DirectCast(e.NewCell, GridViewCell).Editor, GridViewCellEditor), GridViewTextBoxEditor).Focus()
DirectCast(e.NewCell, Telerik.Windows.Controls.GridView.GridViewCell).Cursor = Cursors.IBeam
End Sub
Private
Sub EditCellGotFocus(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
Dim txtEditedCell As TextBox = DirectCast(sender, TextBox)
txtEditedCell.SelectAll()
End Sub
how can i select the textbox value when tabbed to it for edit??
Raj
Orion systems India
