
25/02/2005, 12:08
|
| | Fecha de Ingreso: agosto-2003 Ubicación: Viña del mar
Mensajes: 280
Antigüedad: 21 años, 7 meses Puntos: 0 | |
saludos:
sip el Autopostback esta en true
utilizo este codigo para llenarlo
Protected WithEvents drop As DropDownList
Public Sub listar(ByVal nomProcedimiento As String)
Dim ad As New accesoDatos()
ad.callProcedimiento(nomProcedimiento)
Dim dr As SqlDataReader
ds = ad.fillDataset
DataGrid1.DataSource = " "
DataGrid1.DataBind()
drop = CType(DataGrid1.Items.Item(0).FindControl("DropDow nList1"), DropDownList)
Dim j As Integer = 0
While j < ds.Tables(0).Rows.Count
drop.Items.Add(j)
drop.Items(0).Selected = True
drop.Items(j).Text = ds.Tables(0).Rows(j).Item(0)
If drop.Items(0).Selected = True Then
DataGrid1.Items.Item(0).Cells(2).Text = ds.Tables(0).Rows(0).Item(1)
DataGrid1.Items.Item(0).Cells(3).Text = CInt(ds.Tables(0).Rows(0).Item(2))
DataGrid1.Items.Item(0).Cells(4).Text = _
CInt(CType(DataGrid1.Items.Item(0).FindControl("te xtbox6"), _
TextBox).Text) * CInt(DataGrid1.Items.Item(0).Cells(3).Text)
End If
j += 1
End While
End Sub
pero al hacer el
Private Sub DropDownList2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles drop.SelectedIndexChanged
//codigo
End Sub
pero no se como hacerlo funcionar,,, |