| | |
how to change the colour of rows in a datasheet
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
What's a datasheet? do you mean a DataGrid or GridView control? just set the BackgroundColor property.
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....
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....
![]() |
Similar Threads
- How do i change my Invisionfree forum look/skin? (Existing Scripts)
- How to change the color of selected row of an HTML table without using CSS or Javascr (VB.NET)
- Format single Row in datagridview using a value in same row (C#)
- Changing the colour of the arrows of a select menu in a form (HTML and CSS)
- Can't change my desktop theme - get rundll32.exe (Viruses, Spyware and other Nasties)
- color change of the cols and rows of the table (HTML and CSS)
- Colour (Java)
- I can't fix the changed colour settings of xp (Windows NT / 2000 / XP)
Other Threads in the VB.NET Forum
- Previous Thread: display it in appconfig.xml
- Next Thread: difficulties in designing a menubar
| Thread Tools | Search this Thread |
.net 30minutes 2005 2008 access account arithmetic array arrays basic binary bing button buttons c# center check checkbox code combobox component connectionstring convert crystalreport data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dropdownlist excel file-dialog folder ftp generatetags google gridview hardcopy image images inline insert intel internet listview mobile monitor ms net networking output passingparameters peertopeervideostreaming picturebox picturebox1 plugin port print printing problem problemwithinstallation project reports" save searchbox searchvb.net select serial server soap sorting table tcp text textbox timer toolbox trim update updown user usercontrol vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web wpf






