This is a migrated thread and some comments may be shown as answers.

Automatic EditMode and CellTemplate

1 Answer 12 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Heiko
Top achievements
Rank 1
Veteran
Heiko asked on 26 Feb 2015, 09:39 AM
Hi!

When I bind a GridView to an QCV and klick in a cell the cell/row is in edit-mode and I can change the content of the cell. The moment I use a CellTemplate this functionality is gone, no automatic edit-mode, nothing. Here the example which works:

<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"
    UniqueName="BoilerplateName"
    IsGroupable="False"
    Width="200"
    Header="Name" />

This one is not working - no edit-mode whatsoever:

<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"
                           UniqueName="BoilerplateName"
                           IsGroupable="False"
                           Width="200"
                           Header="Name">
    <telerik:GridViewDataColumn.CellTemplate>
        <DataTemplate>
            <TextBox Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                     AcceptsReturn="True"
                     MaxLength="4000"
                     TextWrapping="Wrap" />
        </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>



1 Answer, 1 is accepted

Sort by
0
Boris
Telerik team
answered on 27 Feb 2015, 01:37 PM
Hello Neils,

The described behavior is an expected one, since you have defined an editor as CellTempate, which represents the view mode of RadGridView. A possible way to go about this is to use the CellEditTemplate property of the desired column, which is the edit mode. For more information about both properties you can refer to the Setting CellTemplate and CellEditTemplate documentation article.

I hope this helps.

Regards,
Boris
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
Heiko
Top achievements
Rank 1
Veteran
Answers by
Boris
Telerik team
Share this question
or