944,123 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 7552
  • ASP.NET RSS
May 24th, 2007
0

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

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
BalagurunathanS is offline Offline
26 posts
since Apr 2007
May 24th, 2007
0

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

ASP.NET Syntax (Toggle Plain Text)
  1. Me.CustomersDataGridView.Rows(1).Cells(3).Selected() = True

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

ASP.NET Syntax (Toggle Plain Text)
  1. 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
Reputation Points: 39
Solved Threads: 0
Light Poster
mike.mclennan is offline Offline
45 posts
since May 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Layer ASP Item Error
Next Thread in ASP.NET Forum Timeline: i want to post data with screen scrap page..





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC