Welcome › Forums › General PowerShell Q&A › DATAGRIDVIEW - BackGround COLOR row
This topic contains 2 replies, has 2 voices, and was last updated by
Excuse me for my english.
I have wrote a script where i charge a file with data in a DATAGRIDVIEW.
Next when i modify some data in the DATAGRIDVIEW i click on a button "GENERATE" for modify somme value.
foreach ($row in $datagridview.Rows)
# Update Value
# CHange color of the current row modify
$row.DefaultCellStyle.BackColor = 'cyan'
At the end i change the color of the row i some value has modify.
Until this, it's OK.
But when i have some row with a background color cyan and i click on the title of a column for order, the color disapear.....
All the background are white.
Can you explain to me and the solution to keep the colour backupground cyan even if I order on a column?
Thanks for your help,
Thanks for your reply.
I have change by :
$row.DefaultCellStyle.SelectionBackColor = 'cyan'
But it's the same when i click on a column to order the datagrid the color disapear.
The topic ‘DATAGRIDVIEW - BackGround COLOR row’ is closed to new replies.