473,386 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How do I prevent OnMouseUp in a DataGrid

I have a derived DataGrid class that overrides the OnMouseUp event so that I
can highlight multiple cells for cut/copy/paste functionality. When the user
selects to open a new file via a OpenFileDialog dialog, the OnMouseUp event
for the grid is called after the user presses the Open button on the
OpenFileDialog dialog. Is there a way to prevent this event from being
passed down to the grid level? It should just call the OpenFileDialog
OnMouseUp event handler, not my grid event handler too.

Thanks,

Scott
Nov 16 '05 #1
3 1640
Sorry about the double posting... Microsoft threw an exception saying that my
message was not received and wouldn't be posted, but then they posted it
anyways....lovely UI there MS.

"Scott" wrote:
I have a derived DataGrid class that overrides the OnMouseUp event so that I
can highlight multiple cells for cut/copy/paste functionality. When the user
selects to open a new file via a OpenFileDialog dialog, the OnMouseUp event
for the grid is called after the user presses the Open button on the
OpenFileDialog dialog. Is there a way to prevent this event from being
passed down to the grid level? It should just call the OpenFileDialog
OnMouseUp event handler, not my grid event handler too.

Thanks,

Scott

Nov 16 '05 #2
Scott wrote:
I have a derived DataGrid class that overrides the OnMouseUp event so that I
can highlight multiple cells for cut/copy/paste functionality. When the user
selects to open a new file via a OpenFileDialog dialog, the OnMouseUp event
for the grid is called after the user presses the Open button on the
OpenFileDialog dialog. Is there a way to prevent this event from being
passed down to the grid level?


I don't know if the mouseup can be prevented. You could also override
OnMouseDown. Only process OnMouseUp if you received a corresponding
OnMouseDown.

H^2
Nov 16 '05 #3
Yeah, that's the work around that I've implemented. I'd like to be able to
prevent it from being called if possible, though.

Thanks,

Scott

"Harold Howe" wrote:
I don't know if the mouseup can be prevented. You could also override
OnMouseDown. Only process OnMouseUp if you received a corresponding
OnMouseDown.

H^2

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jim Bayers | last post by:
I have a simple page, all that's on it is a datagrid. The datagrid is populated on page_load when it is bound to a datareader. The problem is: when a user refreshes the page, new records are...
1
by: Brian | last post by:
Hello - Is there a way to prevent the user from creating a blank row at the bottom of a datagrid? I want a read only grid that allows the user to view data but not select specific cells or...
4
by: Rich | last post by:
I fill a dataset like this: dim da As New SqlDataAdapter, ds As New Dataset, conn As New SqlConnection .... da.Fill(ds, "tbl1") datagrid1.DataSource = ds datagrid1.DataMember = "tbl1" When...
2
by: David Wake | last post by:
I am a complete Javscript newbie trying to produce a user interface similar to Google Maps -- the user should be able to click anywhere on the map and drag it in any direction. The Javascript...
3
by: Ryan Liu | last post by:
Can someone give a sample to prevent a row from being deleted in a datatable? I tried e.Row.RejectChanges(); in dt_RowDeleting() but seems does not work. I need verify if there other data...
9
by: jon | last post by:
Hello, I'm trying to experiment with some javascript to do some custom dragdrop handling. I wish to use the onMouseDown event to trigger the start of my drag, and onMouseup for a potentential...
1
by: NeilCarmichael | last post by:
I am flummoxed, I'm relatively new to javascript and I can't get my onmousedown onmouseup script to work. simply, I want to fire one function when I click down on a graphic and a second when I...
4
by: since | last post by:
How do I in IE prevent the onclick action from being fired when I am done dragging? have tried "window.event.cancelBubble = true", for onmouseup , onmousedown, and onmousemove handlers. The onclick...
1
by: innermostsecret | last post by:
i am using dreamweaver 8 to build my site. i want to put a code in that stops people from viewing my page source and right clicking on the page. i did a google to find a code for this and used it. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.