|
-
May 9th, 2013, 06:34 AM
#1
Thread Starter
Addicted Member
Avoiding calling of DataGridView.CellValueNeededc when mouse moves over cells
Hi,
we are using DataGridView in our application.I noticed that DataGridView.CellValueNeeded is called when i move the mouse over the cells.After some searching i found that When the mouse moves to a cell, the
DataGridView will show a tooltip to show the completed content of the cell if its value cannot be displayed completely in the cell. This will help the user see the complete content of the cell when necessary and it is
the default behavior of the DataGridView. As a result, the CellValueNeeded event will be fired when we move the mouse on it, since it needs the value to format and construct the ToolTip. I don't know if it is correct in my case.Is it?if yes is there anyway to avoid it?
Thank you
-
May 9th, 2013, 06:41 AM
#2
Re: Avoiding calling of DataGridView.CellValueNeededc when mouse moves over cells
May I ask why you want to avoid that event being raised?
-
May 11th, 2013, 01:44 AM
#3
Thread Starter
Addicted Member
Re: Avoiding calling of DataGridView.CellValueNeededc when mouse moves over cells
 Originally Posted by jmcilhinney
May I ask why you want to avoid that event being raised?
Because it may slow down datagridview loading and we don't need tooltip anyway
-
May 11th, 2013, 01:59 AM
#4
Re: Avoiding calling of DataGridView.CellValueNeededc when mouse moves over cells
How is it going to slow down loading if it only happens when you mouse over a cell? Is it even when you mouse over or just when you hover? As for the tool tips, if you set the grid's ShowCellToolTips property to False then they won't be shown. Whether or not that will prevent that event being raised under those circumstances, I don't know, but raising an event is no big deal anyway if you haven't handled it.
-
May 11th, 2013, 06:53 AM
#5
Thread Starter
Addicted Member
Re: Avoiding calling of DataGridView.CellValueNeededc when mouse moves over cells
 Originally Posted by jmcilhinney
How is it going to slow down loading if it only happens when you mouse over a cell? Is it even when you mouse over or just when you hover? As for the tool tips, if you set the grid's ShowCellToolTips property to False then they won't be shown. Whether or not that will prevent that event being raised under those circumstances, I don't know, but raising an event is no big deal anyway if you haven't handled it.
Thanks.That is what i needed.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|