I am working on a WPF datagrid custom control, where i have a Day column for each day a week and 24 columns for each hour a day, i save these values in database in seven different columns(each day a week) and datatype for those columns is Binary(3) (3 bytes * 8 bits=24), 1 bit for each hour, my intention is to bind the grid some way so each cell of grid change its color to red/green based on bit value for that hour(red for 0 and green for 1), but i don’t know where to start.
Looping is not preffered, but if there is no way out, then i should go with that as well.
Kindly help.
Please try this and let me know if this works for you:
DailyValues can be your array of integers (each integer containing the bit values for each day).
I don’t have access to a Visual Studio right now so I apologize for any syntax mistake.