Hola me gustaria saber si es posible insertar datos en la base de datos a traves de un datagrid. Se que con windows form si pero con web form se puede????
Gracias
| |||
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 |