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

GridViewColumn - Two Clicks to Edit

1 Answer 115 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Josh Eastburn
Top achievements
Rank 1
Josh Eastburn asked on 14 Feb 2012, 07:25 PM
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>


1 Answer, 1 is accepted

Sort by
0
Accepted
Dimitrina
Telerik team
answered on 15 Feb 2012, 08:58 AM
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 >>
Tags
GridView
Asked by
Josh Eastburn
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or