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
735
Can't go edit mode in customized Cell by double click cell.
posted

Hi,

    I have a unbound field like below, this field has customized cell value presenter and customized editor.(In my codes, the templates are complicate usercontrol.)

    The problem is when i double click the cell, this cell can't going to edit mode. Is any approach can solve this?

<igDP:XamDataGrid x:Name="xamDataGrid1" >
<igDP:XamDataGrid.FieldLayoutSettings>
<igDP:FieldLayoutSettings HighlightAlternateRecords="True" AllowClipboardOperations="Copy" AllowDelete="False" AllowFieldMoving="WithinLogicalRow" AutoGenerateFields="False" CopyFieldLabelsToClipboard="False" DataErrorDisplayMode="ErrorIconAndHighlight" SupportDataErrorInfo="CellsOnly" />
</igDP:XamDataGrid.FieldLayoutSettings>
<igDP:XamDataGrid.FieldSettings>
<igDP:FieldSettings CellClickAction="EnterEditModeIfAllowed" Width="Auto" CellHeight="26" AllowEdit="True"/>
</igDP:XamDataGrid.FieldSettings>
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout >
<igDP:Field Name="Name">
<igDP:Field.Settings>
<igDP:FieldSettings >
<igDP:FieldSettings.CellValuePresenterStyle>
<Style TargetType="{x:Type igDP:CellValuePresenter}">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<Label Content="Click me"/>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</igDP:FieldSettings.CellValuePresenterStyle>
<igDP:FieldSettings.EditorStyle>
<Style TargetType="{x:Type igEditors:XamTextEditor}">
<Setter Property="EditTemplate">
<Setter.Value>
<ControlTemplate TargetType="{x:Type igEditors:XamTextEditor}">
<TextBox Text="{Binding DataItem.Name}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</igDP:FieldSettings.EditorStyle>
</igDP:FieldSettings>
</igDP:Field.Settings>
</igDP:Field>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
</igDP:XamDataGrid>

Parents
No Data
Reply
  • 2151
    Verified Answer
    Offline posted

    Hello Brandon,

    Thank you for your post. Is it possible for you to use TemplateField like this:

     

    <igDP:XamDataGrid.FieldLayouts>

        <igDP:FieldLayout>

            <igDP:TemplateField Name="Name">

                <igDP:TemplateField.DisplayTemplate>

                    <DataTemplate>

                        <Label Content="Click me"/>

                    </DataTemplate>

                </igDP:TemplateField.DisplayTemplate>

                <igDP:TemplateField.EditTemplate>

                    <DataTemplate>

                        <TextBox Text="{igEditors:TemplateEditorValueBinding}" />

                    </DataTemplate>

                </igDP:TemplateField.EditTemplate>

            </igDP:TemplateField>

        </igDP:FieldLayout>

    </igDP:XamDataGrid.FieldLayouts>

     

    Please do not hesitate to let me know if you have any further questions on this matter.

     

    Sincerely,

    Radko Kolev

    Infragistics Inc.

    www.infragistics.com/support

Children
No Data