Having problem wih gridview
-
I have a grid view with AutoGenerateDeleteButton and AutoGenerateEditButton set to true and and a Detailview with same sqldataosurce as gridview to allow insertion So what I want to do is take that deletcommand isertcommand and updatecommand from codebehind using store procedure, how can I do this,plz help me Or how can I provide to provide commandevent like edit delete and insert from codebehind ]]>" DeleteCommand="DELETE FROM [ElvsysCategory] WHERE [CatId] = @CatId" InsertCommand="INSERT INTO [ElvsysCategory] ([CatName],[CatDescription]) VALUES (@CatName,@CatDescription)" SelectCommand="SELECT [CatId], [CatName],[CatDescription] FROM [ElvsysCategory]" UpdateCommand="UPDATE [ElvsysCategory] SET [CatName] = @CatName,[CatDescription]=@CatDescription WHERE [CatId] = @CatId">
-
I have a grid view with AutoGenerateDeleteButton and AutoGenerateEditButton set to true and and a Detailview with same sqldataosurce as gridview to allow insertion So what I want to do is take that deletcommand isertcommand and updatecommand from codebehind using store procedure, how can I do this,plz help me Or how can I provide to provide commandevent like edit delete and insert from codebehind ]]>" DeleteCommand="DELETE FROM [ElvsysCategory] WHERE [CatId] = @CatId" InsertCommand="INSERT INTO [ElvsysCategory] ([CatName],[CatDescription]) VALUES (@CatName,@CatDescription)" SelectCommand="SELECT [CatId], [CatName],[CatDescription] FROM [ElvsysCategory]" UpdateCommand="UPDATE [ElvsysCategory] SET [CatName] = @CatName,[CatDescription]=@CatDescription WHERE [CatId] = @CatId">
-
I have a grid view with AutoGenerateDeleteButton and AutoGenerateEditButton set to true and and a Detailview with same sqldataosurce as gridview to allow insertion So what I want to do is take that deletcommand isertcommand and updatecommand from codebehind using store procedure, how can I do this,plz help me Or how can I provide to provide commandevent like edit delete and insert from codebehind ]]>" DeleteCommand="DELETE FROM [ElvsysCategory] WHERE [CatId] = @CatId" InsertCommand="INSERT INTO [ElvsysCategory] ([CatName],[CatDescription]) VALUES (@CatName,@CatDescription)" SelectCommand="SELECT [CatId], [CatName],[CatDescription] FROM [ElvsysCategory]" UpdateCommand="UPDATE [ElvsysCategory] SET [CatName] = @CatName,[CatDescription]=@CatDescription WHERE [CatId] = @CatId">
justintimberlake wrote:
So what I want to do is take that deletcommand isertcommand and updatecommand from codebehind using store procedure, how can I do this,plz help me
If you want to call the procedures on edit,update,delete button click, there are events in the datagrid control update-ondatagridupdating delete=ondatagriddeleting edit-ondatagridediting or you can use the common rowcommand attribute for this.
I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--