How to handle custom row delete

4 posts, 0 answers
  1. Stefan
    Stefan avatar
    14 posts
    Member since:
    Dec 2010

    Posted 04 Jan 2011 Link to this post

    I have a DataGrid that is bound to a the Values in a ObservableDictionary (my own class) instead of the traditional ObservableCollection. Because of this, I cannot use the build in delete mechanism of the GridView.  I therefore need to implement my own custom delete behavior on the current selected row when the Delete button is pressed.

    My problem is that I cannot get an event when the delete button is pressed.  Neither the Deleted, Deleting or KeyDown events for the DataGrid is firing.  The CanUserDeleteRows property is set to true.

    How can I get an event to fire when the Delete key is pressed?


  2. Veselin Vasilev
    Veselin Vasilev avatar
    2992 posts

    Posted 05 Jan 2011 Link to this post

    Hello Stefan,

    You can try defining your own custom keyboard command provider as shown here.

    Hope this helps.

    All the best,
    Veselin Vasilev
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  3. Nargis
    Nargis avatar
    8 posts
    Member since:
    Aug 2014

    Posted 27 Aug 2014 Link to this post


    I'm new here and hope I'm posting in the right thread.
    I'm implentig an WPF Application using Telerik UI. I have also a DataGrid that is bound to the Values in a ObservableDictionary (self implemented).
    Actually a blank line is always present. The default message "click to add a new row" is removed by me. The position also defined by

    myGridView.NewRowPosition = Telerik.Windows.Controls.GridView.GridViewNewRowPosition.Bottom;

    The blank line must be appear if the user explicitly clicks an add button.
    If I use the ObservableCollection it works as desired. How could I achieve this behavior by using ObservableDictionary?

    Thanks a lot in advance!
  4. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 29 Aug 2014 Link to this post


    Would you please open a new support ticket on the problem and send us a demo project illustrating the issue when you use your custom ObservableDictionary collection?

    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