Enter key blocks cell editing

2 posts, 0 answers
  1. chillfire
    chillfire avatar
    9 posts
    Member since:
    Apr 2008

    Posted 30 Jun 2014 Link to this post


    I have a bound GridView with calculated row totals, when we edit a cell and mouse click out the cell saves and total calculation works fine.
    When we edit a cell and 'enter' out the total is calculated but the grid becomes sort of read only.
    I say sort of because the only key that any cell will accept is the space key, letters/numbers are being blocked.

    The code behind I am using to fire the row total update is here, the actual viewModel is simply do a linqesque query across some of the columns (this works fine).
    I had to add boolean called refresh into the mix because otherwise when I called Rebind() inside the CellEditEnded it went into a infinite loop, so refresh just forces the rebind to happen once each edit.

    private void dgDisplay_CellEditEnded(object sender, GridViewCellEditEndedEventArgs e)
        refresh = true;
        dgProducts.IsEnabled = true;

    private void dgProducts_SelectedCellsChanged(object sender, Telerik.Windows.Controls.GridView.GridViewSelectedCellsChangedEventArgs e)
        refresh = false;          

    This all works if you click out of the edited cell, but as soon as you hit the enter key it blocks key inputs to the grid cell, except for the space key which it allows?

    Any ideas would be gratefully accepted

  2. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 03 Jul 2014 Link to this post

    Hello Craig,

    Generally, you should not invoke a Rebind as you finish editing a cell. Why is this needed in your case?

    I have attached my test solution. Would you please extend it to demonstrate the original issue you experience?

    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.
Back to Top