Visual Basic .NET Forums  
Click here to advertise with us

Go Back   Visual Basic .NET Forums > Components & Controls > Grids > Winforms Grids

Winforms Grids Discussion related to grid controls of all types for Winforms

VB.NET Forums Newsletter Signup:
Email address:


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-10-2009, 3:39 AM
VB.NET Forum Enthusiast
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Sep 2008
Posts: 89
Reputation: 22
pettrer is on a distinguished programming path ahead
Default Catch click to close form

Hi all,

I have a stupid problem. I have a datagridview with both textcells and comboboxcells in it. If I click a textcell and then click the form's Close button, the form closes alright. But if I click a comboboxcell and then click the Close button (or any button for that matter), the first click only deselects the combobox cell. This is causing me some trouble. Does anyone know how to catch the first click so that I can hook it up to the Close button?

Edit: Upon further investigation, this seems to be the case: If I have selected a combobox outside the datagridview, the Close button works fine. However, if I have selected a combobox inside the datagridview (ie a comboboxcell) the first click only dselects the cell (the CmdClose event won't fire). The Escape key still works correctly though (that is, it fires on the first hit, even if I have selected a combobox in the datagridview).

All suggestions are highly welcome!

All the best,

/Pettrer

Last edited by pettrer; 07-10-2009 at 3:56 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-10-2009, 9:10 AM
VB.NET Forum Enthusiast
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Sep 2008
Posts: 89
Reputation: 22
pettrer is on a distinguished programming path ahead
Default

Never mind, I solved it (I had some code in another place that messed with the first one...)

/Pettrer
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 10:06 AM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2


For advertising opportunities click here.