Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Having problem wih gridview

Having problem wih gridview

Scheduled Pinned Locked Moved ASP.NET
helpcssquestionannouncement
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    justintimberlake
    wrote on last edited by
    #1

    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">

    C S 2 Replies Last reply
    0
    • J justintimberlake

      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">

      C Offline
      C Offline
      Coding C
      wrote on last edited by
      #2

      Use ObjectDataSource instead of SqlDataSource Hope this helps...

      1 Reply Last reply
      0
      • J justintimberlake

        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">

        S Offline
        S Offline
        sidbaruah
        wrote on last edited by
        #3

        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--

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups