What can I use as a "RowSelected" event?

2 posts, 0 answers
  1. Todd Davis
    Todd Davis avatar
    36 posts
    Member since:
    Aug 2009

    Posted 09 Mar 2010 Link to this post

    I have a RadGrid in my application, and when the user clicks on a row, I want to show a dialog box with more information about the data in that row.

    So far, I've been using "SelectionChanged" to tell when someone picks a row and display the dialog. This works really well, unless they close the dialog and then want to re-open it for the same row. Since the selected row isn't changing, the dialog isn't showing. They need to pick another row, close the dialog box, then go back and select the first row again, which is not right.

    I've been looking for an event fires whenever a row is clicked, but I'm not seeing it. Can anyone help?
  2. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 09 Mar 2010 Link to this post

    Hi Todd Davis,

    With Q1, which is due in several days, we will introduce a RowActivated event on RadGridView. This event could help you implement the remaining portion of the required functionality. RowActivated events is raised when Enter key in pressed and row is selected or a selected row is double-clicked.

    public Window1()
    {
        InitializeComponent();
      
        this.playersGrid.ItemsSource = Club.GetPlayers();
        this.playersGrid.RowActivated+=new System.EventHandler<RowEventArgs>(playersGrid_RowActivated);
    }
      
    private void playersGrid_RowActivated(object sender, RowEventArgs e)
    {
        var selectedItem = e.Row.Item;
      
        // show MessageBox
    }


    Regards,
    Milan
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
Back to Top