Skip to main content

grid SelectionChanged fired twice

Comments

2 comments

  • Dapfor Team

    Hello,
    We especially added selection changing information per item. In this case you know what exactly was changed. If we understand your needs, you have a grid in your application and when the user changes selection you handle this event and perform some actions, taking information from the selected row. Also you need to be notified only once. In this case it will be better to subscribe for Grid. FocusedRowChanged event. The Grid can have only one focused row and you will get this notification only once:


    grid.FocusedRowChanged += delegate(object sender, FocusedRowEventArgs e)
    {
    MessageBox.Show(string.Format("New = {0}, Prev = {1}",
    e.NewFocusedRow != null ? e.NewFocusedRow.VisibleIndex.ToString() : "",
    e.PrevFocusedRow != null ? e.PrevFocusedRow.VisibleIndex.ToString() : ""));
    };



    Best regards,
    The Dapfor Team

    0
  • guest

    Yes, absolutely right about my needs... thanks for the solution, appreciate it

    0

Please sign in to leave a comment.

Powered by Zendesk