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

[Solved] Less clicking required for cell edits in grid?

3 Answers 210 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.
Rachel
Top achievements
Rank 2
Rachel asked on 22 Sep 2009, 03:12 AM
Is there a way to make the Silverlight grid open an editor on the first click in a cell, and close the editor when focus is lost?  I have used the WinForms RadGrid, and editing is very intuitive - click in a cell to start editing, click in another cell to edit that one.  In the Silverlight Grid, I have to double-click to begin editing, and hit the enter key to close the editor.  I'd like to make this process simpler, as much like the Winforms version as possible.  Can you help me do that?

Thank you,
Rachel

3 Answers, 1 is accepted

Sort by
0
Missing User
answered on 22 Sep 2009, 07:11 AM
Hello Rachel,

With the Latest Internal Build we have introduced some improvements of the editing mechanism.
In order to achieve the scenario you are describing you should set the EditTriggers property of the grid to CellClick only:

<UserControl xmlns:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"  x:Class="SilverlightApplication45.Page" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" 
    xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
    > 
    <Grid x:Name="LayoutRoot" Background="White">  
                <telerik:RadGridView Name="gridview" 
                 EditTriggers="CellClick" 
                 ColumnsWidthMode="Auto"/>  
    </Grid> 
</UserControl> 
 

or

gridview.EditTriggers = GridViewEditTrigger.CellClick; 

You can also set the EditTriggers property to :

CellClick - enter edit mode on single click
CurrentCellClick - you need to make the cell current and click once again to enter edit mode
F2 - enter edit mode with F2
Default - enter edit mode when the cell is current and also enter edit mode with F2

Another improvement is when you click on a cell and current cell is in edit mode new cell automatically enters into edit mode (when both cells are in a same row).
To commit the edit you can  press the Enter key, the Tab Key or clicking on another cell.
I'm attaching a  sample project for your convenience.

Hope this helps.

Greetings,
Anastasia
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Son Nguyen
Top achievements
Rank 1
answered on 06 Jan 2010, 11:42 PM
Anastasia,

Is it possible to get the following behavior on LEFT and RIGHT arrow keys, and ENTER key?

"Another improvement is when you click on a cell and current cell is in edit mode new cell automatically enters into edit mode (when both cells are in a same row)."
0
Milan
Telerik team
answered on 07 Jan 2010, 01:07 PM
Hello Bilal Azam,

Currently this behavior is only available when using the TAB key or the mouse. We are working on providing more options in a future release. I hope that we will be able to introduce those new capabilities with our Q1 release.


Regards,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Rachel
Top achievements
Rank 2
Answers by
Missing User
Son Nguyen
Top achievements
Rank 1
Milan
Telerik team
Share this question
or