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. Editing in gridview

Editing in gridview

Scheduled Pinned Locked Moved ASP.NET
css
4 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.
  • K Offline
    K Offline
    kris_viswa
    wrote on last edited by
    #1

    Hi experts I have googled for tips/solutions and failed to get a right method to implement following scenario. I have a gridview populated with data on page load from my source table. To make it precise I have fields Ac_Id, Ac_Name, Balance, and user_Id in my table. The user_Id and Ac_Id forms the composite key. I have say 3 rows in my table as follows 1, Cash, 1000, ABC 2. CITI, 8000, ABC 3. BOA , 6000, ABC While editing in grid I want let user edit only the balance field if Ac_Name is Cash otherwise User can Edit both Ac_Name and Balance. whle I could make both ac_name and Balance field editable but failed to achive above. Advise is solicited Thanks in advance and regards Kris

    P C 2 Replies Last reply
    0
    • K kris_viswa

      Hi experts I have googled for tips/solutions and failed to get a right method to implement following scenario. I have a gridview populated with data on page load from my source table. To make it precise I have fields Ac_Id, Ac_Name, Balance, and user_Id in my table. The user_Id and Ac_Id forms the composite key. I have say 3 rows in my table as follows 1, Cash, 1000, ABC 2. CITI, 8000, ABC 3. BOA , 6000, ABC While editing in grid I want let user edit only the balance field if Ac_Name is Cash otherwise User can Edit both Ac_Name and Balance. whle I could make both ac_name and Balance field editable but failed to achive above. Advise is solicited Thanks in advance and regards Kris

      P Offline
      P Offline
      padmanabhan N
      wrote on last edited by
      #2

      make Template fields in grid view. while editing give text box for that fields and according to your secnerio make the textbox read only.

      Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]

      K 1 Reply Last reply
      0
      • K kris_viswa

        Hi experts I have googled for tips/solutions and failed to get a right method to implement following scenario. I have a gridview populated with data on page load from my source table. To make it precise I have fields Ac_Id, Ac_Name, Balance, and user_Id in my table. The user_Id and Ac_Id forms the composite key. I have say 3 rows in my table as follows 1, Cash, 1000, ABC 2. CITI, 8000, ABC 3. BOA , 6000, ABC While editing in grid I want let user edit only the balance field if Ac_Name is Cash otherwise User can Edit both Ac_Name and Balance. whle I could make both ac_name and Balance field editable but failed to achive above. Advise is solicited Thanks in advance and regards Kris

        C Offline
        C Offline
        carlecomm
        wrote on last edited by
        #3

        In gridView RowDataBound event, disable the editor when type is Cash.

        1 Reply Last reply
        0
        • P padmanabhan N

          make Template fields in grid view. while editing give text box for that fields and according to your secnerio make the textbox read only.

          Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]

          K Offline
          K Offline
          kris_viswa
          wrote on last edited by
          #4

          Dear Mr.Padmanabhan Thanks for tip and has worked for me kris

          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