Gridview rowupdating datakeynames

In previous post we discussed how to create 3 – tier architecture application using c#.

we already discussed about 3 – tier architecture layers Presentation Layer, Business Logic Layer and Data Access Layer.

Edit Index = -1 load Stores() End Sub Protected Sub grid View_Row Deleting(By Val sender As Object, By Val e As Grid View Delete Event Args) Dim stor_id As String = grid View.

Edit Index = -1 load Stores() End Sub Protected Sub grid View_Row Canceling Edit(By Val sender As Object, By Val e As Grid View Cancel Edit Event Args) grid View.

Open() Dim cmd As New Sql Command("delete from stores where stor_id=" stor_id, con) Dim result As Integer = cmd.

" End If End Sub Protected Sub grid View_Row Data Bound(By Val sender As Object, By Val e As Grid View Row Event Args) If e.

To String("update stores set stor_name='" stor_name.

Find Control("txtaddress"), Text Box) Dim city As Text Box = Direct Cast(grid View.

Find Control("txtcity"), Text Box) Dim state As Text Box = Direct Cast(grid View.

In this article we create a Gridview from database and add some additional operations such a add, edit and delete data in the Grid View control.

In the previous article , we learned how to create a simple Grid View at runtime . Net project and open the design view and write the following code in the aspx file.

Leave a Reply