Gridview rowupdating code behind

by  |  01-Nov-2019 22:58

Then in the code behind I have handled the On Row Command event.In the event handler function I have checked for the Command Name property and write necessary code for each of the actions. Sql Client; public partial class _Default : System.

gridview rowupdating code behind-65gridview rowupdating code behind-33

To String("javascript:return delete Confirm('") & stor_id) "')") End If End If End Sub Protected Sub grid View_Row Command(By Val sender As Object, By Val e As Grid View Command Event Args) If e. Equals("Add New") Then Dim instorid As Text Box = Direct Cast(grid View. Find Control("instorid"), Text Box) Dim inname As Text Box = Direct Cast(grid View. Find Control("inname"), Text Box) Dim inaddress As Text Box = Direct Cast(grid View. Find Control("inaddress"), Text Box) Dim incity As Text Box = Direct Cast(grid View. Find Control("incity"), Text Box) Dim instate As Text Box = Direct Cast(grid View. Find Control("instate"), Text Box) Dim inzip As Text Box = Direct Cast(grid View.

Open() Dim cmd As New Sql Command("insert into stores(stor_id,stor_name,stor_address,city,state,zip) values('" instorid.

I came across a very interesting error while using buttons/link buttons in the Grid View for editing the Grid View rows data.

The exact situation I faced is like this – I have a Grid View with a column which contains an edit button.

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

Community Discussion