SoloCodigo
CLR: .Net / Mono / Boo / Otros CLR => VB .NET => Mensaje iniciado por: Knapp en Martes 1 de Noviembre de 2005, 17:23
-
Muy Buenas,
No consigo que un dataview me ordene los registros y no veo el error, que seguro debe ser una chorrada... aquí os paso el código...
Gracias :lightsabre:
Siempre me aparece por pantalla así:
2
3
4
CUANDO EL RESULTADO TENDIRA QUE SER:
4
3
2
If Not dsClient Is Nothing Then
Me.ListView1.Columns.Add("REF. CLIENT", 150, HorizontalAlignment.Left)
Me.ListView1.Columns.Add("NOM", 440, HorizontalAlignment.Left)
Me.ListView1.GridLines = True
Me.ListView1.View = View.Details
Me.ListView1.FullRowSelect = True
' .GridLines = True
Me.ListView1.LabelEdit = False
With objDataView
.Table = Me.dsClient.Clients
.Sort = Me.dsClient.Clients.Columns(e.Column).ColumnName & " DESC"
' .RowFilter = Me.dsClient.Clients.Columns(e.Column).ColumnName & " like '%' "
.RowStateFilter = DataViewRowState.OriginalRows
End With
With Me.ListView1
For intAux = 0 To objDataView.Count - 1
With .Items.Add(objDataView.Table.Rows(intAux).Item("Client_id"))
.SubItems.Add(objDataView.Table.Rows(intAux).Item("Nom"))
''.SubItems.Add(drProdComp.Preu.ToString)
End With
If .Items.Count Mod 2 = 0 Then
With .Items(.Items.Count - 1)
.BackColor = Color.Wheat
End With
End If
Next
End With
End If
-
Hice un ejemplo de lo mismo y pues sorprise me salio el mismo error,
Que raro, espero y ya lo tengas solucionado jejeje para que pases tu solucion al foro.
Pero ¡¡¡QUE RARO!!! :scream: <_< :blink:
-
pues no... sigo igual. No entiendo que coño le pasa. :lightsabre:
Salut