•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 392,007 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,194 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser:
Views: 584 | Replies: 0
![]() |
•
•
Join Date: Feb 2005
Posts: 17
Reputation:
Rep Power: 4
Solved Threads: 2
Hi,
I have an application where i want a datagridview to treat single mouse clicks as if they are ctrl_clicks. IE I when a user clicks on a row, the rows state is togled (eg not selected to selected or vice versa), without affecting any other rows.
So far the only way i have found to do this is to intercept the mouse down event and manually keep track of which rows were selected & ensure that the 'correct' rows remain selected. My code works, but there is a noticeable delay between the grid clearing the selected rows & my code reselecting them.
Ideally I want to 'trick' the grid into simply thinking the ctrl key was depressed when the mouse was clicked.
Any ideas anyone?
Thanks.
I have an application where i want a datagridview to treat single mouse clicks as if they are ctrl_clicks. IE I when a user clicks on a row, the rows state is togled (eg not selected to selected or vice versa), without affecting any other rows.
So far the only way i have found to do this is to intercept the mouse down event and manually keep track of which rows were selected & ensure that the 'correct' rows remain selected. My code works, but there is a noticeable delay between the grid clearing the selected rows & my code reselecting them.
Ideally I want to 'trick' the grid into simply thinking the ctrl key was depressed when the mouse was clicked.
Any ideas anyone?
Thanks.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb C# Marketplace
Similar Threads
- From database to a datagrid (C#)
- Datagrid - Help (VB.NET)
- COMBOBOX VS DATAGRIDVIEW - resizing and positioning! (VB.NET)
- Printing the datagrid control (ASP.NET)
- Use of DataGrid (ASP.NET)
- Remove link frame around picture in Datagrid (ASP.NET)
- Linking to E-mail through datagrid (ASP.NET)
Other Threads in the C# Forum
- Previous Thread: How to make doc to pdf converter in .NET 2005?
- Next Thread: books on data structures and algorithms in C sharp


Linear Mode