GridViewColumn - Two Clicks to Edit

2 posts, 1 answers
  1. Josh Eastburn
    Josh Eastburn avatar
    32 posts
    Member since:
    Aug 2012

    Posted 14 Feb 2012 Link to this post

    I have a RadGridView that has a GridViewColumn with a CellTemplate and a CellEditTemplate.
    However, this column requires TWO clicks to edit a cell.  The first click seems to give focus to the Row/Cell and the second click puts it in edit mode.

    Is there a way to enter the CellEditTemplate with one click when moving from another row?  The EditTriggers set to "CellClick" does not seem to work here.

    <telerik:RadGridView CanUserFreezeColumns="False" RowIndicatorVisibility="Collapsed"
                    ItemsSource="{Binding Buyers}" IsFilteringAllowed="False"
                    AutoGenerateColumns="False" ShowGroupPanel="False" SelectionUnit="Cell" EditTriggers="CellClick">
        <telerik:RadGridView.Columns>
        <telerik:GridViewColumn Header="Attempts" >
            <telerik:GridViewColumn.CellTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding Attempts, Mode=OneWay}"/>
            </DataTemplate>
            </telerik:GridViewColumn.CellTemplate>
            <telerik:GridViewColumn.CellEditTemplate>
            <DataTemplate>
                <telerik:RadNumericUpDown Value="{Binding Attempts, Mode=TwoWay}" />
            </DataTemplate>
            </telerik:GridViewColumn.CellEditTemplate>
        </telerik:GridViewColumn>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Conversations}" Header="Conversations" UniqueName="Conversations" HeaderTextAlignment="Center" TextAlignment="Center" Width="125" />
        </telerik:RadGridView.Columns>
    </telerik:RadGridView>


  2. Answer
    Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 15 Feb 2012 Link to this post

    Hello,

     Please use GridViewDataColumn instead of GridViewColumn. That way the first click will put the cell into Edit mode.

    Greetings,
    Didie
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top