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

Datagrid SelectionBackcolor??

Hi

I am trying to use the SelectionBackColor method of the datagrid however it
doesn't work. Is there a method of rendering that needs to be invoked?

The following is the code snippet

Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DataGrid1.CurrentCellChanged

DataGrid1.Select(DataGrid1.CurrentRowIndex)

DataGrid1.SelectionBackColor = Drawing.Color.Aquamarine

End Sub
Regards

Meir
Nov 20 '05 #1
2 2892
Hi,

If you added a tablestyle to the grid change the tablestyles
selectionbackground color instead of the grids.

Ken
--------------------
"Meir Rotfleisch" <me**@mrrcomputers.cc> wrote in message
news:e5**************@tk2msftngp13.phx.gbl...
Hi

I am trying to use the SelectionBackColor method of the datagrid however it doesn't work. Is there a method of rendering that needs to be invoked?

The following is the code snippet

Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged

DataGrid1.Select(DataGrid1.CurrentRowIndex)

DataGrid1.SelectionBackColor = Drawing.Color.Aquamarine

End Sub
Regards

Meir

Nov 20 '05 #2
* "Meir Rotfleisch" <me**@mrrcomputers.cc> scripsit:
I am trying to use the SelectionBackColor method of the datagrid however it
doesn't work. Is there a method of rendering that needs to be invoked?


You will find a sample for changing the colors here:

<http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Improve your quoting style:
<http://learn.to/quote>
<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #3

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

Similar topics

3
by: Zürcher See | last post by:
Someone has implemented a Datagrid Button for the Windows.Form?
3
by: PeterZ | last post by:
G'day, After doing much searching and pinching bits of ideas from here there and everywhere I came up with a fairly 'clean' solution of including a comboBox into a dataGrid column. You can...
3
by: Richard | last post by:
I have a requirement to put a GDI style circle or rectangle border around the selected row of a datagrid/ It will overlap into the row above and below the selected row. Doing this in a the OnPaint...
1
by: Marco Di Gregorio | last post by:
Hello I need somebody’s help with the following I tried to display data to a DataGrid, that is not the problem But if I try to add a TableStyle to a DataGrid then I don’t get a result ( no...
7
by: Dave | last post by:
Are there any add-on products or samples available that can do the following in an vb.net datagrid I want to compare 2 rows in a datagrid - one row from one database and another row for another...
6
by: Agnes | last post by:
I understand it is impossible, but still curious to know "Can I freeze several column in the datagrid, the user can only scroll the first 3 columns (not verical), for the rest of the coulumn, it is...
13
by: pmcguire | last post by:
I have a DataGrid control for which I have also created several new extended DataGridColumnStyles. They behave pretty nicely, but I can't figure out how to implement Selected Item formatting for...
2
by: Shawn | last post by:
I am using a datagrid with a tablestyle added. I set the SelectionBackColor in the GUI for the datagrid to white and also in code in the tablestyle definitions. I even tried setting it in code...
8
by: wk6pack | last post by:
Hi, I have a datagrid that is populated from a query in SQL Server. The first time I run the form, it appears, I make changes or view it and it is fine. When I close the form and open it up...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.