1. Binding List<T> to a DataGridView = DataGridView Empty
2. ~ write with color in datagridview
Set up multiple DataGridViewCellStyles and then
apply it to the cells you want to change.
Dim MakeItRed as New DataGridViewCellStyle()
MakeItRed.ForeColor = Color.Red
You can do a whole column:
thisGrid.Columns("price").DefaultCellStyle = MakeItRed
To apply this to a cell, you have to access the cell
through the row.
For Each row1 As DataGridViewRow In thisGrid.Rows
If row1.Cells("price").Value IsNot DBNull.Value Then
If CType(row1.Cells("price").Value, Decimal) > 5 Then
row1.Cells("price").Style = MakeItRed
Else
row1.Cells("price").Style = MakeItBlue
End If
End If
Next
Hope this helps.
Robin S.
----------------------------------
3. How do I write in the DataGridView
4. Writing to crystal report from datagridview
5. Writing Excel (binary) XLS from datagridview
6. write with color in datagridview
7. write data of unbound datagridview to XML
9. Where can I find DataGridView for VBA? DataGridView vs DataGrid?
10. Where can I find DataGridView for VBA? DataGrid vs DataGridView
11. Where can I find DataGridView for VBA? DataGridView vs DataGrid?
12. Can i write a method not use transaction in a class which require transaction?
13. Where can I find DataGridView for VBA? DataGridView vs DataGri
14. DataTable with UDT issue with DataGridView
15. How to Sinchronize a DataGridView with a database.