Changing Background for Specific items in a DataGrid
-
I have a datagrid that i populate with Invoices. I currently have the alternating item background color switching between silver and white. Now, i would like for the background to be Red for any Paid orders. How can my datagrid check whether the invoice has been paid or not? and then update the background color for just that row? All help is appreciated! Brian
-
I have a datagrid that i populate with Invoices. I currently have the alternating item background color switching between silver and white. Now, i would like for the background to be Red for any Paid orders. How can my datagrid check whether the invoice has been paid or not? and then update the background color for just that row? All help is appreciated! Brian
Search for the ItemDataBound event... http://www.google.com/search?hl=en&ie=UTF-8&q=ItemDataBound&btnG=Google+Search[^] Barry Etter
-
I have a datagrid that i populate with Invoices. I currently have the alternating item background color switching between silver and white. Now, i would like for the background to be Red for any Paid orders. How can my datagrid check whether the invoice has been paid or not? and then update the background color for just that row? All help is appreciated! Brian
Easy stuff. Okay, once you find a row that needs to be colored, you can do the following: MYDATAGRID.Items(ROWNUMBER).BackColor = Color.Red Where: MYDATAGRID is the name of your datagrid ROWNUMBER is the integer value of the row to change Jon G www.Gizmocoder.com