473,769 Members | 3,557 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disable events in Datagrid.

Hi All,
I am working on the winform datagrid. Now I have to disable the cursor
movement in the datagrid using teh Arrow keys on keyboard and also I want to
disable the mouse wheel (the scroll button) for the datagrid. Please help me
in this regard. Its urgent.

I will be waiting for the reply...

Thanks in Advance,
GS
May 8 '06 #1
3 2563
You can acheive this by setting 'Enabled' property of the data grid to
'false'

Reshma
"GhanaShyam " <Gh********@dis cussions.micros oft.com> wrote in message
news:8E******** *************** ***********@mic rosoft.com...
Hi All,
I am working on the winform datagrid. Now I have to disable the cursor
movement in the datagrid using teh Arrow keys on keyboard and also I want
to
disable the mouse wheel (the scroll button) for the datagrid. Please help
me
in this regard. Its urgent.

I will be waiting for the reply...

Thanks in Advance,
GS

May 8 '06 #2
But the datagrid is not completely Read Only. I have a check box which has to
work.
I just want to disable cursor movements and the mouse wheel movements
May 8 '06 #3
Hi,

what if you derive from datagrind, intercept these events and do nothing
with them?
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"GhanaShyam " <Gh********@dis cussions.micros oft.com> wrote in message
news:EE******** *************** ***********@mic rosoft.com...
But the datagrid is not completely Read Only. I have a check box which has
to
work.
I just want to disable cursor movements and the mouse wheel movements

May 8 '06 #4

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

Similar topics

2
1872
by: PAUL GROSSMAN | last post by:
Hello everyone. I am working with a DataGrid using VB .Net (Windows Forms). I want to make one of the columns un-editable. I was able to do that by setting the .dsName.Tables("TblName").Columns("ColName").ReadOnly = True That made it so you can't change the value in the column, but you're still tabbing into the column (despite the fact you can't change it).
3
3963
by: Mark | last post by:
Hi all, I have a datagrid with a few bound columns. I have one column where for each row, I would like to check a condition and disable the individual hyperlink associated with the datarow if the condition is met. How can I do this in the codebehind when the datagrid is created? I have been playing around with the ItemCreated and ItemDataBound events of the datagrid but cannot quite nail it.
3
7984
by: Jianfeng Chen | last post by:
no problem with vb6, but what's wrong with the datagrid binding with vb.net? thanks.
1
5653
by: Joe Lalor | last post by:
I want to disable row deletion in a Windows form datagrid. I have tried using the row_changed/row_deleted events for the datasource to reject changes for the row : this prevents the row from being deleted from the table, but it disappears from the grid.
7
23100
by: Scott Emick | last post by:
How can I disable events for the controls on a form? I tried setting the form's enable property to false, but that doesn't stop events from firing on its controls. I need to temporarily disable a form and load values into controls without any events firing, then re-enable the form. -- Scott Emick Web Programmer
8
15169
by: simchajoy2000 | last post by:
I thought the only thing I had to do to disable column sorting in VB.NET was to set datagrid.AllowSorting = False. Unfortunately this has never worked for me. I discovered another set of code that seems to work for 99% of the cases where I need to disable datagrid column sorting: Private Sub datagrid_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles datagrid.MouseDown Dim pt As New Point(e.X,...
2
14869
by: Mike | last post by:
Hi, I would like to disable sorting in a winform datagrid when a column header is clicked. The following does *not* seem to disable sorting and clicking the column header still sorts the grid: After loading data into the dataset: {
6
1757
by: Steve Hershoff | last post by:
Hi everyone, I've got a strange one here. There are two datagrids on my page, one nested within the other. I'll refer to them as the topmost and secondary datagrids. In the topmost datagrid's OnItemDataBound() method we check for the row in which it's appropriate to add the secondary datagrid. Exactly one row in the topmost grid will contain the secondary grid.
1
7138
by: ECD | last post by:
Hello all, I can usually find solutions to my .NET problems by searching these groups, but I'm stumped on this one. I have a datagrid in VB.NET (2.0 framework). I want to disable sorting on the first column in the grid only. I havent found a way to reliably do this yet. I tried putting the following code in the datagrid's mouse down event Dim hti As DataGrid.HitTestInfo
0
9579
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
10206
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10035
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9851
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
8863
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
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3949
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2811
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.