|
-
Jan 17th, 2005, 08:22 AM
#1
Thread Starter
New Member
setting datagrid backcolor.Am I on right way??
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|