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
370
XamTextEditor double click
posted

Good afternoon,

I have a custom editor style for the XamTextEditor like this:

<Style TargetType="{x:Type igEditors:XamTextEditor}" x:Key="clientInstitutionEditorStyle">
            <Setter Property="EditTemplate">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type igEditors:XamTextEditor}">
                        <TextBox Text="{Binding DataItem.clientInstitutionName, Mode=TwoWay}" x:Name="clientInstitutionName" TextChanged="TypeAhead_TextChanged_Handler" PreviewKeyDown="TypeAhead_PreviewKeyDown_Handler" ></TextBox>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

And I use it like this in my XamDataGrid:

<igDP:Field Name="clientInstitutionName" Label="client Institution" Width="120" >
                            <igDP:Field.Settings>
                                <igDP:FieldSettings EditAsType="{x:Type sys:String}" EditorType="{x:Type igEditors:XamTextEditor}" EditorStyle="{StaticResource clientInstitutionEditorStyle}"></igDP:FieldSettings>
                            </igDP:Field.Settings>
                        </igDP:Field>

It works perfectly but users have to click once after pressing F2 to really get into the TextBox contained into the editor, is there anyway to make that the internal textbox gets the focus when users press F2 on the active cell?

Thanks,

Parents Reply Children