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
300
Set focus on Record
posted

When one Button is clicked. i wan to do ...

set focus on teh 5th cell of Record...

this

 

.xamdataGrid.Records[0].FieldLayout.Fields[5].IsSelected = true;

 

but i observe that systm does not set focus ..Below is the style applied to the field

 

 

<Style x:Key="cvpWhiteWithGrayText" TargetType="igDP:CellValuePresenter">

 

 

<Setter Property="Background" Value="#FFFFFFFF"/>

 

 

<Setter Property="Foreground" Value="#FFCFCFCD"/>

 

 

<Setter Property="Template">

 

 

<Setter.Value>

 

 

<ControlTemplate TargetType="igDP:CellValuePresenter">

 

 

<Border Background="#FFFFFFFF" BorderBrush="Gray" BorderThickness="0,0,0.5,0" HorizontalAlignment="Stretch">

 

 

<Grid Background="Transparent" HorizontalAlignment="Stretch">

 

 

<TextBox GotFocus="TextBox_GotFocus" LostFocus="TextBox_LostFocus" BorderBrush="Transparent" BorderThickness="0" Background="#FFFFFFFF" Foreground="#FFCFCFCD" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Value}"/>

 

 

</Grid>

 

 

</Border>

 

 

</ControlTemplate>

 

 

</Setter.Value>

 

 

</Setter>

 

 

</Style>

-----------------------------------------