473,402 Members | 2,046 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,402 software developers and data experts.

Keep Focus To Main Controls On Click To Another

maheshwag
I have a datagridview and listbox control on winforms . My task is not to lost focus from datagridview on press or click to listbox control.

I want to keep focus on datagridview.

For Example: when datagridview have focus and if I press or click to listbox then the datagridview lost the focus but I just want to keep focusing datagridview on press or click to listbox. Any help will appreciated.

I have tried datagridview.focus() on click event of listbox but it's lost the focus from datagridview columns1 and gain the focus to datagridview columns2. In short the said event and calling method is lost the focus from datagridview. I just want to keep focusing datagridview columns1 on click to listbox. Is it possible?.
May 13 '12 #1
0 1381

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Razor | last post by:
How can I call a sub and keep the main program running while it works?
21
by: Dan V. | last post by:
I have tried a number of things including preloading, but the background image (water tile in header) in IE 6 will not display where other browsers will....
1
by: James Dean | last post by:
I am trying to add controls(labels) to the main form from another class without having the main form as a base class......how do i do this? *** Sent via Developersdex...
4
by: Andrew Diabo | last post by:
I have 2 forms (Form1 and Form2) in my C# project. I created the second form from the main form like so: Fom2 aForm = new Form2(); aForm.ShowDialog(); How do I access the properties of a...
4
by: David | last post by:
I have trying to have a webform inherit controls from another form and can't get it to work Say I have a form that saves the person's demographic info. ****one.aspx**** //I have an object...
3
by: NickP | last post by:
Hi there, This might sound like a stupid question but this whole exception being thrown when accessing user controls from another thread is extremely over the top! Just looking at the index...
2
by: mahi543 | last post by:
how can we call one class main method from another class main method? i tried but i got an idea for method we can call one method from another method
16
by: Mike | last post by:
Hi, I have a form with some controls, and a different class that needs to modify some control properties at run time. Hoy can I reference the from so I have access to its controls and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
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...
0
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...
0
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,...

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.