|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Datagridview Conditional Formatting in .Net 2005Hi all,
I am using a datagridview in .Net 2005 to display data from a stored procedure using a System.Data.SQLClient connection. After the stored procedure dumps the data into a dataset and the datagridview is displayed I need to conditionally format the backcolors of the rows (this will be controlled by the value of a cell that contains a checkbox from the SQL table). How do I change the row backcolor if the cell's check box is checked on any given row (and there are many rows) - the row backcolor needs to be changed to red, otherwise the row backcolor should be displayed as white. I have tried several different pieces of code without any luck. Any help would be appreciated. Thanks! jbehrne wrote:
Show quoteHide quote > Hi all, http://msdn2.microsoft.com/en-us/library/z1cc356h.aspx> > I am using a datagridview in .Net 2005 to display data from a stored > procedure using a System.Data.SQLClient connection. After the stored > procedure dumps the data into a dataset and the datagridview is displayed I > need to conditionally format the backcolors of the rows (this will be > controlled by the value of a cell that contains a checkbox from the SQL > table). How do I change the row backcolor if the cell's check box is checked > on any given row (and there are many rows) - the row backcolor needs to be > changed to red, otherwise the row backcolor should be displayed as white. > > I have tried several different pieces of code without any luck. Any help > would be appreciated. Thanks! This should give you the information you are looking for. Chris
Using AxWebBrowser in VB 2005
Domain search like setting file permissions For Each... statement Proble about "send" Text on Image Resolution Reading Stream After RedirectStandardOutput=True Blocks Confusion on Protected Overrides checking for EOF time expressions Loop through columns of all datarows in a dataset |
|||||||||||||||||||||||