[VB.NET] DataGrid tablestyle
Salut à tous,
Quelqu'un peut-il me dire pourquoi, lorsque je redéfini des colonnes de mon datagrid avec des style de colonnes de VB.net la propriété AlternatingBackColor ne réagit plus?
Voici un bout de code:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| Dim backbrush As New Color
DataGrid_emplacement.AlternatingBackColor = backbrush.LightGray
DataGrid_emplacement.ReadOnly = True
Dim tableStyle As New DataGridTableStyle
tableStyle.MappingName = "Emplacement"
Dim textCol As New DataGridTextBoxColumn
textCol.MappingName = "maglok"
textCol.HeaderText = "Code emplacement"
textCol.Width = 150
tableStyle.GridColumnStyles.Add(textCol)
textCol = New DataGridTextBoxColumn
textCol.MappingName = "oms30"
textCol.HeaderText = "Description"
textCol.Width = 200
tableStyle.GridColumnStyles.Add(textCol)
DataGrid_emplacement.TableStyles.Add(tableStyle) |