Multi Selection of rows

TeeGrid .NET for Microsoft Visual Studio .NET.
Post Reply
BayCFR
Newbie
Newbie
Posts: 4
Joined: Fri Nov 12, 2021 12:00 am

Multi Selection of rows

Post by BayCFR » Fri Apr 15, 2022 10:38 am

How can I detect which rows are selected in the grid ?

Marc
Site Admin
Site Admin
Posts: 1272
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: Multi Selection of rows

Post by Marc » Wed Apr 20, 2022 7:19 am

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
Steema Support

Post Reply