Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I select Row on RightClick?
Message
 
To
08/09/2008 10:46:21
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
VB 9.0
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01345747
Message ID:
01345881
Views:
15
Hi Marcia,

"CellMouseClick method in DataGridView"
May be you can try something like this part of code:
        private void dgvDataReader_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
                if (e.ColumnIndex != -1 && e.RowIndex != -1)
                {
                    dgvDataReader.ClearSelection();
                    dgvDataReader.CurrentCell = dgvDataReader.Rows[e.RowIndex].Cells[e.ColumnIndex];
                }
        }
HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform