When I call formatogrid, it doesn`t work, can anybody give a hand on that
plz
thnx
VB Code:
  1. Dim mitb As New DataTable("Registros")
  2.  
  3.  
  4. Private Sub frmConsultaDetalle_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  5.  
  6.  
  7.         LlenaLista(cboEstado, "Estado")
  8.         mitb = objTQueja.DevuelveQuejasEstado("PENDIENTE")
  9.         dtgQuejas.DataSource = mitb
  10.         formatogrid()
  11.     End Sub
  12.  
  13. Sub formatogrid()
  14.         With dtgQuejas
  15.             .BackColor = Color.GhostWhite
  16.             .BackgroundColor = Color.GhostWhite
  17.             .BorderStyle = BorderStyle.None
  18.             .CaptionBackColor = Color.FloralWhite
  19.             .CaptionFont = New Font("Tahoma", 10.0!, FontStyle.Bold)
  20.             .CaptionForeColor = Color.Black
  21.             .CaptionText = "Registros de Quejas"
  22.             .Font = New Font("Tahoma", 8.0!)
  23.             .ParentRowsBackColor = Color.Beige
  24.             .ParentRowsForeColor = Color.MidnightBlue
  25.  
  26.         End With
  27.  
  28.         Dim miestilo As New DataGridTableStyle
  29.         With miestilo
  30.             .AlternatingBackColor = Color.GhostWhite
  31.             .BackColor = Color.GhostWhite
  32.             .ForeColor = Color.MidnightBlue
  33.             .GridLineColor = Color.RoyalBlue
  34.             .HeaderFont = New Font("Tahoma", 8.0!, FontStyle.Bold)
  35.             .SelectionBackColor = Color.OldLace
  36.             .SelectionForeColor = Color.Blue
  37.             .MappingName = "Registros"
  38.         End With
  39.  
  40.         Dim grdColStyle1 As New DataGridTextBoxColumn
  41.         With grdColStyle1
  42.             .HeaderText = "Código"
  43.             .MappingName = "reclamoID"
  44.             .ReadOnly = True
  45.             .Width = 30
  46.         End With
  47.  
  48.         Dim grdColStyle2 As New DataGridTextBoxColumn
  49.         With grdColStyle2
  50.             .HeaderText = "Fecha Registro"
  51.             .MappingName = "fecRegistro"
  52.             .ReadOnly = True
  53.             .Width = 50
  54.         End With
  55.  
  56.         miestilo.GridColumnStyles.AddRange(New DataGridColumnStyle() {grdColStyle1})
  57.  
  58.         dtgQuejas.TableStyles.Add(miestilo)
  59.     End Sub