954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How To highlight a row or a column in a datagrid....?

Hi All...

I have a datagrid with values bound to it..I have two columns in the datagrid.The first column is the name field and the second column is age field..Now i need to higlight the highest age which is found in the datagrid..I want to differentiate it from other rows by giving some color differences in the datagrid...

Someone help in this regard....


Balaguru

BalagurunathanS
Light Poster
26 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 
Me.CustomersDataGridView.Rows(1).Cells(3).Selected() = True


this is used to selected a row or a cell in the DataGrid

Me.CustomersDataGridView.SelectedCells(0).Style.ForeColor = Color.Coral


This can used to to change the Style (backcolor, font color, etc....) of the now selected cells.

I am sure you can do the work to figure out which of the ages is the highest.... but this will highlight, or bold or whatever you want to do to that row or cell.

Hope this helps 8-D

mike.mclennan
Light Poster
45 posts since May 2007
Reputation Points: 39
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You