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. Edit Grid View (urgent)

Edit Grid View (urgent)

Scheduled Pinned Locked Moved ASP.NET
helpcssdatabaseannouncement
2 Posts 2 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.
  • K Offline
    K Offline
    ksaw123
    wrote on last edited by
    #1

    Hello everybody... In my Grid View I have 3 parameters: 1- IPAddressID (primary key) int not mull (cannot be updated (auto generated)). 2- OrgCode int not null (a dropdownlist that is taken from another table). 3- IPAddress varchar(50) not null (textbox). and I am getting this error when trying to update: ObjectDataSource 'ODSIPAddress' could not find a non-generic method 'UpdateQuery' that has parameters: OrgCode, IPAddress, original_IPAddressID, Original_OrgCode, Original_IPAddress. Here is the query that I am using for updating in the dataobject: UPDATE DHS_IPAddress SET OrgCode = @OrgCode, IPAddress = @IPAddress WHERE (IPAddressID = @Original_IPAddressID) AND (OrgCode = @Original_OrgCode) AND (IPAddress = @Original What should I do to solve this problem. I realy wish to get a clear answer.

    K 1 Reply Last reply
    0
    • K ksaw123

      Hello everybody... In my Grid View I have 3 parameters: 1- IPAddressID (primary key) int not mull (cannot be updated (auto generated)). 2- OrgCode int not null (a dropdownlist that is taken from another table). 3- IPAddress varchar(50) not null (textbox). and I am getting this error when trying to update: ObjectDataSource 'ODSIPAddress' could not find a non-generic method 'UpdateQuery' that has parameters: OrgCode, IPAddress, original_IPAddressID, Original_OrgCode, Original_IPAddress. Here is the query that I am using for updating in the dataobject: UPDATE DHS_IPAddress SET OrgCode = @OrgCode, IPAddress = @IPAddress WHERE (IPAddressID = @Original_IPAddressID) AND (OrgCode = @Original_OrgCode) AND (IPAddress = @Original What should I do to solve this problem. I realy wish to get a clear answer.

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      Since you are using an object datasource it is expecting that your update method will have parameters for all the editable fields in your gridview row. You need to create an update method and point to it in your objectdatasource. The signature of that method must match what the objectdatasource expects or it won't work. Inside that method take the three fields and call your update method. Hope that helps. Ben

      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