473,666 Members | 2,331 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1653
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....love ly 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
1629
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 added to the datagrid, duplicating everything that was there. How do I prevent this? Should I clear the datagrid at the top of every page_load? Can I set a variable the first time the page is loaded and check it for the next refresh?
1
2170
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 create a blank row, etc. Thanks, Brian
4
2501
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 the form containing datagrid1 displays, all the records are there. The dataAdapter, da, is based on a stored procedure which only returns a set
2
5777
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 works OK when the map is only dragged a few pixels. If the map is dragged any significant distance, however, the cursor changes to a document-like icon (in Firefox 1.5) or a circle with a line through it (in IE 5) and no onMouseUp event is fired on...
3
2293
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 using data in this row before actually remove it from datagrid. I can certainly control with Delete button. But if I want to allow the user to use Del key on the keyboard, I lost this kind control.
9
7590
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 drop. I hope to turn on the onmouseup only in onmousedown. And eventually go one step further and incorporate onmousemove for a true drag workflow. I'm running into a problem however, where after mousedown, mouseup will not fire when I release...
1
3788
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 release. I tried different combinations of onmousedown onmouseup and onclick and putting them in div's img's and anchor's but I can't get it to work, any ideas?
4
2198
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 sort action always seems to get fired. Any help would be greatly appeciated. The following demo is sortable and resizable. I basically don't want the onclick action to be fired if I am resizing a column. Steve <HTML> <HEAD> <style>
1
1654
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. it works in IE 7 but not in Firefox. PLEASE....i would greatly appreciate the help. below is the code i found. </script> <SCRIPT LANGUAGE="JavaScript1.1"> <!-- Begin function right(e) { if (navigator.appName == 'Netscape' &&...
0
8443
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8550
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8639
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7385
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4366
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1772
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.