row editing problem in gridview

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nagarjunaReddy
    New Member
    • Apr 2007
    • 4

    row editing problem in gridview

    hi i am trying to edit the row in grid view but that did not call the row_editing event when i click the edit button in grid view and it gives the error like

    "The GridView 'GridView1' fired event RowEditing which wasn't handled."
    please any one help me as early as possible to solve the problem that i am facing
  • channaJ
    New Member
    • Mar 2007
    • 67

    #2
    Originally posted by nagarjunaReddy
    hi i am trying to edit the row in grid view but that did not call the row_editing event when i click the edit button in grid view and it gives the error like

    "The GridView 'GridView1' fired event RowEditing which wasn't handled."
    please any one help me as early as possible to solve the problem that i am facing
    Hi,

    I think you have not handled the particular event. Add an event handler to the particular event and try.

    Comment

    • nagarjunaReddy
      New Member
      • Apr 2007
      • 4

      #3
      Originally posted by channaJ
      Hi,

      I think you have not handled the particular event. Add an event handler to the particular event and try.
      hi ,thank you very much for ur reply
      i added the event in the code behind file like the following
      Code:
      void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
      {
          GridView1.EditIndex = e.NewEditIndex;
          binddata();
      }
      Last edited by Frinavale; Aug 10 '10, 02:18 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.

      Comment

      • nagarjunaReddy
        New Member
        • Apr 2007
        • 4

        #4
        Originally posted by nagarjunaReddy
        hi ,thank you very much for ur reply
        i added the event in the code behind file like the following
        Code:
        void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
        {
          GridView1.EditIndex = e.NewEditIndex;
          binddata();
        }
        yes i found the solution to this problem,just we have to click on the properties icon set the property RowEditing to GridView1_RowEd iting and then we have to write the above code
        Last edited by Frinavale; Aug 10 '10, 02:19 PM.

        Comment

        • threetracs
          New Member
          • Oct 2007
          • 1

          #5
          Originally posted by nagarjunaReddy
          hi i am trying to edit the row in grid view but that did not call the row_editing event when i click the edit button in grid view and it gives the error like

          "The GridView 'GridView1' fired event RowEditing which wasn't handled."
          please any one help me as early as possible to solve the problem that i am facing

          Hey there,
          You need to create the method to handle that action. It should look something like this:

          Code:
          protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
          {
                      
          }
          Last edited by Frinavale; Aug 10 '10, 02:20 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.

          Comment

          • matinee
            New Member
            • Aug 2010
            • 1

            #6
            Hi,

            I have experienced this too. But when i change my CommandName from "Edit" to "EditItem", it works.

            I hope this blog will explain more details: <link removed>
            Last edited by Frinavale; Aug 10 '10, 02:20 PM. Reason: Please do not use this forum to advertise your blog.

            Comment

            • sasikala guru
              New Member
              • Dec 2012
              • 1

              #7
              Just change the "CommandNam e" property of the "Edit" button from "Edit" to "EditRow"(o r something else which is relevent to you but make sure it is not "Edit"). Now surprisingly the code works fine.

              Comment

              Working...