
13/04/2005, 08:02
|
| | Fecha de Ingreso: marzo-2005
Mensajes: 190
Antigüedad: 19 años, 11 meses Puntos: 0 | |
yo lo hice de la siguiente forma
Private Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
checkisediting("")
If Not isediting Then
addingnew = True
dataadapter = New System.Data.SqlClient.SqlDataAdapter(queryString, dbConnection)
dataset = New System.Data.DataSet()
dataadapter.Fill(dataset, "Inventario")
Dim rowvalues As Object() = {"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""}
dataset.Tables(0).Rows.Add(rowvalues)
Dim recordcount As Integer = dataset.Tables(0).Rows.Count
If recordcount > 1 Then
recordcount -= 1
DataGrid1.CurrentPageIndex = recordcount \ DataGrid1.PageSize
DataGrid1.EditItemIndex = recordcount Mod DataGrid1.PageSize
End If
DataGrid1.DataSource = dataset.Tables("Inventario").DefaultView
DataGrid1.DataBind()
End If
End Sub
__________________ MARIA JESUS :si: :aplauso:
----------------------------------------------------
"no hay nada bueno ni malo el pensar lo hace asi"
w.shakespeare |