Multiple EditTriggers for RadGridView

5 posts, 0 answers
  1. Maurice Jordan
    Maurice Jordan avatar
    1 posts
    Member since:
    Jul 2011

    Posted 20 Jun 2014 Link to this post

    HI !

    The following code behind code is working:

    radGridView.EditTriggers = Telerik.Windows.Controls.GridView.GridViewEditTriggers.F2 | Telerik.Windows.Controls.GridView.GridViewEditTriggers.CellClick | Telerik.Windows.Controls.GridView.GridViewEditTriggers.TextInput;

    This codes means that the radgridview will accept either F2, CellClick, or TextInput to trigger the cell's edit mode.

    But how to do these in a resource like:

    <Setter Property="EditTriggers" Value="?" />

    I don't know how to specify multiple values inside the value attribute.

    Thank you.
  2. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 20 Jun 2014 Link to this post


    When specifying it in XAML, you need to separate them with a comma, for example:
    EditTriggers="F2, CellClick, TextInput"

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
  3. Anna Katrina
    Anna Katrina avatar
    9 posts
    Member since:
    Feb 2013

    Posted 11 Jun 2015 Link to this post


    I am doing inline editing for each cell, however after I edit one cell, it automatically goes to the next cell in Edit mode. Any advise how I can prevent that to happen? What I would like to do is, after i edit the cell, it will stay on the cell ive edited (not in Edit mode).

     Here is my code:

    <telerik:RadGridView x:Name="gvUserList"
                                 EditTriggers="F2, CellClick, TextInput"
                                 SelectionUnit="Cell" SelectionMode="Extended"
                                 AMT_Utilities:ContextMenuBehavior.ContextMenu="{Binding ElementName=GridContextMenu}">
                                    <telerik:RadContextMenu x:Name="GridContextMenu">
                                            <telerik:RadMenuItem Header="Edit User Record" />
                                    <telerik:GridViewDataColumn Header="ID"
    DataMemberBinding="{Binding UserID}"
    Width="60"  IsVisible="False"/>
                                    <telerik:GridViewDataColumn Header="Last Name"
    DataMemberBinding="{Binding LastName}"
    Width="*" />
                                    <telerik:GridViewDataColumn Header="First Name"
    DataMemberBinding="{Binding FirstName}"
    Width="*" />
                                    <telerik:GridViewDataColumn Header="Email"
    DataMemberBinding="{Binding Email}"
    Width="*" />
                                    <telerik:GridViewDataColumn Header="Country/Territory"
    DataMemberBinding="{Binding CountryName}"
    Width="*" />
                                    <telerik:GridViewDataColumn Header="Delivery Method"
    DataMemberBinding="{Binding DeliveryMethod}"
    Width="*" />
                                    <telerik:GridViewDataColumn Header="Phone"
    DataMemberBinding="{Binding PhoneNo}"
    Width="*" />
                                    <telerik:GridViewDataColumn Header="Username"
    DataMemberBinding="{Binding Username}"
    Width="*" />
                                    <telerik:GridViewDataColumn Header="Company"
    DataMemberBinding="{Binding CompanyName}"
    Width="*" />
                                    <telerik:GridViewDataColumn Header="Delivery Method" Width="*" DataMemberBinding="{Binding DeliveryMethod}" />
                                    <telerik:GridViewDataColumn Header="Phone" Width="Auto" DataMemberBinding="{Binding PhoneNo}" />
                                    <telerik:GridViewDataColumn Header="Username" Width="Auto" DataMemberBinding="{Binding Username}" />
                                    <telerik:GridViewDataColumn Header="Company" Width="*" DataMemberBinding="{Binding CompanyName}"  />-->

  4. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 12 Jun 2015 Link to this post

    Hello Anna,

    Do you press any key, for example Tab, in order to finish editing the cell?
    If so, you can define a custom Keyboard Command Provider and specify the handling when the user presses Tab.

    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
  5. Anna Katrina
    Anna Katrina avatar
    9 posts
    Member since:
    Feb 2013

    Posted 12 Jun 2015 in reply to Dimitrina Link to this post

    Hi Dimitrina, 

    Thanks! This command solve my issue! More power!

Back to Top