GridView Problem
-
Hi all, I am using GridView in one ASP.NET, VB.NET application. I want to select data using select command of SqlDataSource but I don't want to do other operations like deleting and updating using SqlDataSource. So I am using RowDeleting() and RowUpdating() event handler of GridView. But When I click on Delete link in GridView it goes to event handler, do delete operation using my custom query and then it gives me error like "Deleting is not supported by data source (SqlDataSource1) unless DeleteCommand is specified". Any way to get rid out of this DeleteCommand? Thanks in advance, Priyank
-
Hi all, I am using GridView in one ASP.NET, VB.NET application. I want to select data using select command of SqlDataSource but I don't want to do other operations like deleting and updating using SqlDataSource. So I am using RowDeleting() and RowUpdating() event handler of GridView. But When I click on Delete link in GridView it goes to event handler, do delete operation using my custom query and then it gives me error like "Deleting is not supported by data source (SqlDataSource1) unless DeleteCommand is specified". Any way to get rid out of this DeleteCommand? Thanks in advance, Priyank
Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView1.RowDeleting e.Cancel = True End Sub I hope it should work. http://www.tsspltd.com