User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 402,521 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 2,642 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: Programming Forums
Views: 602 | Replies: 0
Reply
Join Date: Feb 2005
Posts: 17
Reputation: kon_t is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 2
kon_t kon_t is offline Offline
Newbie Poster

imitate Ctrl_Click in datagrid / datagridview

  #1  
Sep 4th, 2007
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.
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C# Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C# Forum

All times are GMT -4. The time now is 6:40 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC