Page 1 of 1

Multi Selection of rows

Posted: Fri Apr 15, 2022 10:38 am
by 24092389
How can I detect which rows are selected in the grid ?

Re: Multi Selection of rows

Posted: Wed Apr 20, 2022 7:19 am
by Marc
Hello,

Example:

Code: Select all

//set with:
teeGrid1.Selected.Changed += Selected_Changed;

//example event code
        private void Selected_Changed(object sender, EventArgs e)
        {

            var selection = sender as GridSelection;

            if (selection.Column == teeGrid1.Columns[0] && selection.Row != 5)
            {
                MessageBox.Show($"You've clicked a button on row {selection.Row}");
            }
        }
Regards,
Marc Meumann