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

Putting a cell into edit mode on click?

12 Answers 919 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Andy
Top achievements
Rank 1
Andy asked on 20 Apr 2009, 10:49 AM
Currently you have to click twice on a cell to enter edit mode it seems. Is there a way to trigger edit mode on the cell on the initial click of the cell?

Thanks

12 Answers, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 22 Apr 2009, 09:33 AM
Hi Andy,

We plan to introduce some other (except DoubleClick) conditions to put GridViewCell into EditMode, but I cannot commit with any specific date or release.

For now I can suggest you a workaround with a few lines of code. All you have to do is to subscribe to RadGridView.CurrentCellChanged event and call RadGridView.BeginEdit() method. I'm attaching my test application for your reference.

Regards,
Nedyalko Nikolov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
BlogReader
Top achievements
Rank 1
answered on 25 Apr 2009, 12:53 AM
I second the need to enter edit mode on single click.
0
mjohn mjohn
Top achievements
Rank 1
answered on 07 Sep 2010, 03:30 PM
I need to enter edit mode on single click too.
0
Vlad
Telerik team
answered on 07 Sep 2010, 03:40 PM
Hi,

 You can set EditTriggers="CellClick" to achieve this. 

Regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
mjohn mjohn
Top achievements
Rank 1
answered on 08 Sep 2010, 04:30 AM
It is very good!
But the checkbox cell still need click twice to changed the value.
Thanks!
0
Nedyalko Nikolov
Telerik team
answered on 08 Sep 2010, 02:46 PM
Hi mjohn mjohn,

You can use our dedicated CheckBox column which has some extra property "AutoSelectOnEdit" that solves this problem:

<telerik:GridViewCheckBoxColumn EditTriggers="CellClick" AutoSelectOnEdit="True" Header="Active" DataMemberBinding="{Binding IsActive}" />

I hope this helps.

Kind regards,
Nedyalko Nikolov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Hrushikesh
Top achievements
Rank 1
answered on 11 Nov 2010, 09:37 PM
This Still not doing on single click, need 2 click one for selecting the row and other for select and deselct the value of the checkbox.

here is how i implemented

 
<telerik:RadGridView x:Name="gridView"
                        EditTriggers="CellClick"
                        AutoGenerateColumns="False"
                        ColumnWidth="*"
                        CanUserFreezeColumns="False"
                        VerticalAlignment="Top"
                        AlternationCount="2"
                        ItemsSource="{Binding MathchedRecords}"
                        SelectedItem="{Binding UserSelectedItem, Mode=TwoWay}"
                         ShowGroupPanel="False" Grid.Row="1"
                         BeginningEdit="gridView_BeginningEdit"
                         SelectedCellsChanged="gridView_SelectedCellsChanged">
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewCheckBoxColumn AutoSelectOnEdit="True" Header="   " DataMemberBinding="{Binding IsSelected}"   />
                            <telerik:GridViewDataColumn Header="Code" DataMemberBinding="{Binding ValueKey}" IsReadOnly="True"   />
                            <telerik:GridViewDataColumn Header="Description" DataMemberBinding="{Binding DisplayDescription}" IsReadOnly="True" />
                        </telerik:RadGridView.Columns>
                    </telerik:RadGridView>

 

 

 

 


Thank you
Hrushikesh Patel
0
Veselin Vasilev
Telerik team
answered on 12 Nov 2010, 10:26 AM
Hello Hrushikesh,

Actually, you need to combine that property with the EditTriggers="CellClick" for that column:

<telerik:GridViewCheckBoxColumn AutoSelectOnEdit="True" Header="   " DataMemberBinding="{Binding IsSelected}" EditTriggers="CellClck" />

This way, only one click should be enough to change the checked state of the column.

Best wishes,
Veselin Vasilev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Krishna
Top achievements
Rank 1
answered on 01 Aug 2013, 12:08 PM
HI,
mine is also same case with a bit Different Apporach .
In My RadGridView i have a Column which Uses CellEditTemplateSelector
in that case it not getting cell to edit mode with one Click .
plz Suggest me Solution For This Problem,.
all Other Columns Are Normal and Those are Ok.

Regards,
Krishna
0
Vera
Telerik team
answered on 05 Aug 2013, 10:04 AM
Hello Krishna,

Attached you can find a sample project with CellEditTemplateSelector. Are you able to get the problem on it? Is there anything specific in your scenario?


Regards,
Vera
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Scott
Top achievements
Rank 1
answered on 01 Oct 2015, 07:34 AM
Is there a simple way to allow single click on a cell to enter edit mode in a GridView, but double click to fire a different command and have the cell not enter edit mode?
0
Yoan
Telerik team
answered on 05 Oct 2015, 07:44 AM
Hi Scott,

You can set the EditTriggers property of the column to CellClick. In this way the cells will enter edit mode with a single click only. As for the DoubleClick event - I suppose that you want to commit the edit operation on this event, since the cell will be already in edit mode when the event is raised (due to the first mouse click). So, you can handle GridView's MouseDoubleClick event and invoke grid's CommitEdit method. Then you will be able to execute your own command.

I hope this helps.

Regards,
Yoan
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
Andy
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
BlogReader
Top achievements
Rank 1
mjohn mjohn
Top achievements
Rank 1
Vlad
Telerik team
Hrushikesh
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Krishna
Top achievements
Rank 1
Vera
Telerik team
Scott
Top achievements
Rank 1
Yoan
Telerik team
Share this question
or