how to change the colour of rows in a datasheet

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2007
Posts: 72
Reputation: geetajlo is an unknown quantity at this point 
Solved Threads: 0
geetajlo geetajlo is offline Offline
Junior Poster in Training

how to change the colour of rows in a datasheet

 
0
  #1
Oct 9th, 2007
hi i want to change the color of rows in a datasheet that is i want each rows to be of one color. Is it possible?
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 1,181
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Solved Threads: 67
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: how to change the colour of rows in a datasheet

 
0
  #2
Oct 9th, 2007
What's a datasheet? do you mean a DataGrid or GridView control? just set the BackgroundColor property.
==========================================
Yadda yadda yadda...
Web junky, fevered monkey
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 72
Reputation: geetajlo is an unknown quantity at this point 
Solved Threads: 0
geetajlo geetajlo is offline Offline
Junior Poster in Training

how to change the colour of rows in a datasheet

 
0
  #3
Oct 11th, 2007
For Datagrid
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 82
Reputation: preetham.saroja is an unknown quantity at this point 
Solved Threads: 1
preetham.saroja's Avatar
preetham.saroja preetham.saroja is offline Offline
Junior Poster in Training

Re: how to change the colour of rows in a datasheet

 
0
  #4
Oct 11th, 2007
if u want to change the datagrid color,,,,
Use datagrid_itemdatabound()
If (e.Item.ItemType = ListItemType.Item) Or (e.Item.ItemType = ListItemType.AlternatingItem) Then
Dim value As String = Trim(e.Item.DataItem("Sex"))
If value = "male" Then
e.Item.BackColor = System.Drawing.Color.Chocolate ' i is the index of the particular column
End If
End If
--------------
change according to ur requirement...!!
regards,,,
preetham....
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC