473,386 Members | 1,748 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.

Hide selection in DataGridView inside a UserControl

Hi.

I have a UserControl with a DataGridView and 3 buttons (New, Edit and
Delete) inside.
I wanna do something like that: when the focus leaves the UserControl,
it hides the selection of the grid. So, in the Leave event of the
UserControl i made the following:

myGrid.ClearSelection();

It's obvious, but when I use Tab key to navigate between the window,
and it cleans the selection, the focus goes to the grid!!!! When should
be going to the next control.....

I cannot use the Leave event of the grid, because the Enabled property
of the buttons Edit and Delete depends on the selection of the grid. So
I wanna use the Leave event of the UserControl, but how do I do this
task??

Thanx.

Jul 24 '06 #1
0 2514

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

Similar topics

3
by: Lynn | last post by:
Hello, I have a user control that contains a table, and some text fields. I would like to show or hide a particular row of this table, based on a selection the user makes on my page. Here's...
4
by: Stropher | last post by:
I have the following: this.dataGridViewBill.DataSource = tblResult; //hide the following columns this.dataGridViewBill.Columns.Visible = false; //email this.dataGridViewBill.Columns.Visible =...
2
by: Øyvind Isaksen | last post by:
Is it possible to show/hide a usercontrol code behind? <uc1:topart id="Topart1" runat="server"></uc1:topart> This is what i want to do, but this does not work: if objDR.read me.Topart1.show...
0
by: Paul | last post by:
I'm creating a UserControl that uses a DataGridView in virtual mode. It was working fine other than a few bugs. After I fixed those few bugs, I broke it. I have a cache of 50 records. The...
0
by: Andrus | last post by:
I use DataGridView containing DataGridViewComboBoxColumn column. Combobox column displays dropdown list opening selection triangle in all rows. This covers part of visible data if columns are...
0
by: Paul | last post by:
I created a UserControl that has a DataGridView. I want to make the .Columns property of the DataGridView available from the UserControl when it is placed on a form. Since it's readonly I made...
0
by: kea62227 | last post by:
I need to present some data. The obvious way is to use a datagridview, but I would like to make it presented better. Therefore I have created a usercontrol that presents a row of data more...
4
by: Frederik | last post by:
Hi all, Can someone tell me how I can host a LinkLabel in a DataGridView (the existing DataGridViewLinkColumn does not provide what I need). Do I need to derive from DataGridViewTextBoxCell or...
0
by: Peted | last post by:
Hello, Ive got a datagridview, on a splitcontainer, in a system.windows.forms.usercontrol. The datagrid view by default shows 3 colums of data and fills exactly the size of the user control...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...

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.