
21/04/2005, 12:08
|
 | | | Fecha de Ingreso: abril-2005
Mensajes: 17
Antigüedad: 19 años, 10 meses Puntos: 0 | |
Que tal Jose minglein2, mira puse el codigo en el boton de agregar, y me marco algunos errores asi lo deje:
__________________________________________________ _________________
Private Sub btnAgregar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAgregar.Click
Dim temp As DataTable
temp.Columns.Add(New DataColumn(1))
temp.Columns.Add(New DataColumn(2))
Dim i As Integer = 0
While i < dgProductos.Items.Count
If CType(dgProductos.Controls.Item(i), CheckBox).Checked Then
Dim fila As TableRow = temp.NewRow '''''''*aqui me marca Value of type "System Data.DataRow" cannot be converted to "System Web.UI.WebControls.TableRow" '''''''*En estos dos me marca:
Class "System Web.UI.WebControls.TableRow" cannot be indexed because it has no default property.
fila(1) = dgProductos.Items(i).Cells(1).Text
fila(2) = dgProductos.Items(i).Cells(2).Text
temp.Rows.Add(fila) ''''''* Este marca overload resolution failed because no accessible 'Add' . End If
i += 1
End While
dgCompra.DataSource = temp
dgCompra.DataBind()
end sub
Cual es el error que estoy cometiendo, gracias por tu ayuda, un cordial saludo. |