Hola,
Deseo aplicar un estilo a un DataGrid Pero no lo consigo
Lleno el dataGrid con un dataset y luego aplico el estilo... pero no
hace nada, lo veo igual q antes.
Aqui va el codigo del estio:
' crear estilo de tabla para el datagrid
Dim oTableStyle As New DataGridTableStyle
oTableStyle.MappingName = "id"
' crear columnas personalizadas para el estilo del grid
Dim colID As New dgAmpleColum(50)
colID.MappingName = "id"
colID.HeaderText = "ID"
colID.Width = 50
Dim colTAG1 As New dgAmpleColum(150)
colTAG1.MappingName = "tag1"
colTAG1.HeaderText = "TAG 1"
colTAG1.Width = 150
Dim colTAG2 As New dgAmpleColum(70)
colTAG2.MappingName = "tag2"
colTAG2.HeaderText = "TAG 2"
colTAG2.Width = 70
Dim colDH As New dgAmpleColum(70)
colDH.MappingName = "DiaHora"
colDH.HeaderText = "Dia Hora"
colDH.Width = 70
' agregar columnas al estilo
oTableStyle.GridColumnStyles.AddRange(New DataGridColumnStyle()
{colID, colTAG1, colTAG2, colDH})
' aplicar estilo al grid
Me.dgAfom.TableStyles.Add(oTableStyle) >>>>>>>>>>>>>>> NO HACE
NADA!!
Gracias,
Leer las respuestas