Gridview handle rowupdating Free desi sexy chating web cam

Posted by / 16-Oct-2018 18:38

Gridview handle rowupdating

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 .

Sql Client; public partial class _Default : System.

Open() Dim cmd As New Sql Command("Select * from stores", con) Dim da As New Sql Data Adapter(cmd) Dim ds As New Data Set() da.

Page Private con As New Sql Connection("Data Source=.; Initial Catalog=pubs; User ID=sa; Password=*****") Protected Sub Page_Load(By Val sender As Object, By Val e As System. Load If Not Is Post Back Then load Stores() End If End Sub Protected Sub load Stores() con.

Data Bind() Dim columncount As Integer = grid View.

" End If End Sub Protected Sub grid View_Row Editing(By Val sender As Object, By Val e As Grid View Edit Event Args) grid View. New Edit Index load Stores() End Sub Protected Sub grid View_Row Updating(By Val sender As Object, By Val e As Grid View Update Event Args) Dim stor_id As String = grid View.

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.

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

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

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.

gridview handle rowupdating-58gridview handle rowupdating-19gridview handle rowupdating-55

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.