Focus cell clicked by mouse

2 posts, 0 answers
  1. Roger
    Roger avatar
    3 posts
    Member since:
    Jun 2009

    Posted 27 Aug 2015 Link to this post

    After adding a handler, the next step is to set focus to the cell (if any) under the mouse click.

    this.AddHandler(MouseLeftButtonDownEvent, new MouseButtonEventHandler(this.myRadGridView_MouseDown), true);

    I can set the cell focus given row and column.

    The goal is to find the UIElement under the mouse click, if any, and then attempt to set Focus to it.

    Thank you for your assistance.

  2. Petya
    Petya avatar
    983 posts

    Posted 01 Sep 2015 Link to this post

    Hello Roger,

    It sounds like you're trying to trigger editing of a cell when clicking on it, is that correct? In that case, a much simpler approach would be to set the EditTriggers property of RadGridView.
    <telerik:RadGridView x:Name="radGridView1" EditTriggers="CellClick" />

    If this is not what you're trying to achieve, could you please provide some details on your ultimate goal? This will help us advise you on the best approach that you can adopt.

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