
Código:
El codigo de arriba funciona, si me llena el grid, ahora necesito ordenarlo, de antemano gracias.Do While reader.Read orden = reader(0) cliente.Hora = "" While (Not lineRead Is Nothing) If Count > 4 Then Audio = RTrim(LTrim(Mid(lineRead, 8, 10))) 'audio a = RTrim(LTrim(Mid(lineRead, 85, 2))) b = RTrim(LTrim(Mid(lineRead, 88, 2))) c = RTrim(LTrim(Mid(lineRead, 91, 2))) Hora = a & ":" & b & ":" & c Spot = RTrim(LTrim(Mid(lineRead, 104, 40))) If Audio = orden Then horario = cliente.Hora cliente = gw.ComparaOrden(Audio, estacion, fecha, horario, Hora) If cliente.Estatus = 1 Then duracion = cliente.Hora version = cliente.Version tiempo = cliente.Tiempo auxTiempo = tiempo Else duracion = "" version = "Cortesía" If auxTiempo = "" Then tiempo = "20" Else tiempo = auxTiempo End If End If If RTrim(LTrim(Audio)) = RTrim(LTrim(orden)) Then Audio = "/SDRIntranet/Imagenes/Estaciones/sound2.ico" correo = "/SDRIntranet/Imagenes/Estaciones/e-mail.gif" ClienteN = txtCliente.Text Campaña = lblCampaña.Text DurCampaña = txtFechaFinal.Text ordens = txtOrden.Text ColumnsJoiner(0) = UCase(CType(duracion, String)) ColumnsJoiner(1) = UCase(CType(Hora, String)) ColumnsJoiner(2) = UCase(CType(version, String)) ColumnsJoiner(3) = UCase(CType(tiempo, String)) ColumnsJoiner(4) = UCase(CType(Audio, String)) ColumnsJoiner(5) = UCase(CType(correo, String)) ColumnsJoiner(6) = UCase(CType(radio, String)) ColumnsJoiner(7) = UCase(CType(ClienteN, String)) ColumnsJoiner(8) = UCase(CType(ordens, String)) ColumnsJoiner(9) = UCase(CType(Campaña, String)) ColumnsJoiner(10) = UCase(CType(DurCampaña, String)) 'cmd.CommandText = "exec InsertaValores '" & duracion & "','" & Hora & "','" & version & "','" & tiempo & "','" & Audio & "','" & correo & "','" & radio & "','" & ClienteN & "','" & ordens & "','" & Campaña & "','" & DurCampaña & "'" 'cmd.ExecuteNonQuery() RowToJoin = ColecctionJoiners.Add(ColumnsJoiner) ds.Tables(0).AcceptChanges() dgBooks.DataSource = ds.Tables(0) dgBooks.DataBind() dgBooks.Visible = True End If End If End If Count += 1 'Response.Write(RegTxt.ToString) lineRead = fileRd.ReadLine() End While Count = 5 fileRd = New StreamReader(Paths) lineRead = fileRd.ReadLine() Loop reader.Close() fileRd.Close()


