How do I make the datagridview line text in bold when I pick a row?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
The below code will make the font under Bold style for the selected row. "Total" is the last row check in my code
Handle the CellFormatting event of the DataGridView and apply a bold style to the font if the cell belongs to a selected row:
After loading the contents in Datagrid, apply these event handlers to RowEnter and RowLeave.
Codes are not tested. But it should work fine.
Hope it helps.
Try to handle
SelectionChanged
event of dataGridView and setcell
style.