473,378 Members | 1,420 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,378 software developers and data experts.

Disable DataGridView cell highlighting

I have Text box controls and DataGridView control in WinForms form.

DataGridview contains custom ComboBox columns and standard TextBox columns.
Edit mode is EditOnEnter.

When focus is moved out of DataGridView, its current cell is displayed as
selected state (blue background).

How to remove this highlight so that selected cell is not highlighted at all
(or highlighted only when grid is active control).

Andrus.
Mar 24 '08 #1
1 16933
On the DefaultCellStyle for the grid, set the SelectionBackColor to the same
color as the BackColor for the cell.

RobinS.

"Andrus" <ko********@hot.eewrote in message
news:u5**************@TK2MSFTNGP02.phx.gbl...
>I have Text box controls and DataGridView control in WinForms form.

DataGridview contains custom ComboBox columns and standard TextBox
columns. Edit mode is EditOnEnter.

When focus is moved out of DataGridView, its current cell is displayed as
selected state (blue background).

How to remove this highlight so that selected cell is not highlighted at
all (or highlighted only when grid is active control).

Andrus.
Mar 27 '08 #2

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

Similar topics

0
by: Steve | last post by:
I am looking for an example of a custom user control ( 2 labels and 2 datetime pickers ) in a datagridview cell. Every example I have come across handles only once control such as a datetimepicker...
1
by: mkrei | last post by:
I have datagrid that I format at runtime with tablestyles and adding columns. I have a DataGridBoolColumn that I have subclassed, but can't get the right result. I want to disable a cell based on...
11
by: dgk | last post by:
Is there a way to change the foreground or background color of a single cell in an unbound datagridview?
3
by: Rich | last post by:
Hello, If I want to update data displayed in a datagrideview/datagridview cell, how can I determine what cell I am updating? I am looking at the click event below, for example. Can I get...
10
by: steve | last post by:
Hi All I would like to be able to change the cell borders on certain cells to none at runtime to make a group of cells appear to be merged I have tried the following in the cellformatting...
0
by: martin1 | last post by:
All, how to disable DatagridView column sort? Thanks
0
by: varunk2 | last post by:
Hi How to autocomplete a datagridview cell in c# windows forms. Please anybody help me... Thanks in advance Regards,
0
by: hydro123 | last post by:
I am using VC++2008 and am trying to read data enetered in unbound datagridview to implement in function. Under button_click event I entered the following: // initialize varaibles from...
0
by: ziketo | last post by:
Hi, I searched a lot about changing the DataGridView cell borders. BYTES helped me so I will write down the solution: 1. You should override the class DataGridViewTextBoxCell, and the new class...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.