Hi,
in my windows application ,i have a datagrid with 3 columns ,like this:


Name Surname Sex
JULIA HILL F
BRAD MOON M
TOM PASCAL M
..
..



and i want to set rows color of datagrid conditionally
e.g

if sex="M"
rowcolor="blue"
else
rowcolor="red"

ok.i created datagridtablestyle

with grdTableStyle
.mappingname="Process1"
and i inserted a code like this;

dim i as integer
for i= 0 to (dataviewProcess.count) -1
if dgprocess.item(i,2)="M" then
.backcolor =color.blue
else
.backcolor=color.red
endif
next
end with
dgProcess.Tablestyles.add(grdTableStyle)

but i couldnt set backcolor of row which has "M" or "F" value at its third column.


am I on right way?