c# - Change specific cell color depending on it's data -


i have datagrid view connected access database there column called status. want when cell in column changed ready background color of cell changes green , if not ready changes red.

suggestions?

on databound function of grid can check cell condition , color cell.

example:

protected void grd_databound(object sender, eventargs e) {     foreach (gridviewrow gr in grd.rows)     {         //here run loop on rows , check value of cell of column name status          gr.cells[index of cell].backcolor = system.drawing.color.cyan;     } } 

hope might you.


Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -