Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Gridviewに20行10列のデータがあります。 [1行][1列]、[3行][1列]のように特定のセルの背景色を灰色に設定する必要があります。 私はこの行を書きました
code.grdsellthru.Rows[3].BackColor = System.Drawing.Color.Gray;
しかし、色は行全体を適用しています。 3行1列だけを適用する必要があります。
色は合計行を適用しています.3行目1列のみを適用する必要があります
Cell次のように行とともに指定する必要があります。
Cell
grdsellthru.Rows[3].Cells[1].BackColor = System.Drawing.Color.Gray;