I am looking to have alternating datagridview rows.
Like so:
You can arrange that in the AlternatingRowsDefaultCellStyle
and RowsDefaultCellStyle
property of your datagridview.
Step 1
Click on the button for your DataGridViewCellStyle
Step 2
Select the color for the alternating row
Repeat for the RowsDefaultCellStyle to have different colors. By default both are set to a back color of white. Adjust as you wish.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.