473,789 Members | 2,728 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

deactive datagridview cell select

Hi, All,

The datagridview auto-select first column first row data and the slected
cell background color is blue, so how to turn off the select? or how to
change selected cell backcolor to white?

Thanks
Jul 28 '06 #1
2 9423
Hi,

Try this
DataGridView1.D ataSource = bsOrderDetails
DataGridView1.I tem(0, 0).Selected = False

Ken
-----------------------
"martin1" <ma*****@discus sions.microsoft .comwrote in message
news:BA******** *************** ***********@mic rosoft.com...
Hi, All,

The datagridview auto-select first column first row data and the slected
cell background color is blue, so how to turn off the select? or how to
change selected cell backcolor to white?

Thanks


Jul 29 '06 #2
Thank you, Ken,

yes it is turn off first column first row selection, but when click it, it
is re-selected, so how to set up dataGridView selection false so that user
cannot select since the app start?

"Ken Tucker [MVP]" wrote:
Hi,

Try this
DataGridView1.D ataSource = bsOrderDetails
DataGridView1.I tem(0, 0).Selected = False

Ken
-----------------------
"martin1" <ma*****@discus sions.microsoft .comwrote in message
news:BA******** *************** ***********@mic rosoft.com...
Hi, All,

The datagridview auto-select first column first row data and the slected
cell background color is blue, so how to turn off the select? or how to
change selected cell backcolor to white?

Thanks


Jul 31 '06 #3

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

Similar topics

0
1940
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 or a value list, etc. Can anyone point me in the right direction? Thanks!
11
109619
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
14580
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 information from the sender object or the EventArgs? How? Private Sub DataGridView1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.Click Console.WriteLine("row number of cell is ?")
10
45216
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 event..., to no avail Any ideas Regards
2
1493
by: galletg | last post by:
please; how to write by code in a datagrid view cell a text in a textbox. thank you for your help. georges gallet
12
13647
by: cj | last post by:
When viewing a datatable in a datagridview one of the columns in it is a "note" field which can be quite long. I would like to have the note field of the currently selected row of the datagrid display in a textbox below the datgridview. I currently have it fixed so if you click on a row the note field from that row is put in the textbox. I'd like this to be automatic as they move through rows. Also the note field is one of two fields...
0
2751
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
5290
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 dataGridView double C1; double INF1; double T1; //Read String values from each dataGridView Cell String^C1s = safe_cast<String^>(dataGridView1->Value); String^INF1s = safe_cast<String^>(dataGridView1->Value);
0
15250
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 should have a property of type DataGridViewAdvancedBorderStyle, this property you will change from the outside: 2. You will override also the PaintBorder, and Paint methods in a way that they will get the new property instead of the default one....
0
9666
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
9511
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,...
0
10412
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
9986
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
9021
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...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5422
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
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4093
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

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.