Update button is not getting fired.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shekharncst
    New Member
    • Feb 2010
    • 1

    Update button is not getting fired.

    Hi I am using GridView in ASPX page

    Code:
    <asp:GridView AutoGenerateEditButton ="false" id="siGridView" runat="server" 
                                      Font-Names="Cordia New" Font-Size="Smaller" 
                                      AllowSorting="True" AllowPaging ="true" PageSize="20" 
                                      HorizontalAlign="left" 
                                      onsorting="switchGridView_Sorting" 
                                      Font-Bold="False" 
                                      onrowcancelingedit="switchGridView_RowCancelingEdit" 
                                      onrowediting="switchGridView_RowEditing" 
                                      onrowupdating="switchGridView_RowUpdating" Width="1170px">
                                    <RowStyle HorizontalAlign="left"  BackColor="#E6E6FA" Font-Size="Medium"/>
                                    <SelectedRowStyle Font-Size="Medium" />
                                    <HeaderStyle HorizontalAlign="Center" BackColor="#CCCCFF" ForeColor="#003366" />
                                    <columns>
                                        <asp:commandfield 
                                            showeditbutton="true"
                                            ControlStyle-Height="25px"
                                            ControlStyle-Width="75px"
                                            ControlStyle-Font-Names="Cordia New"
                                            ControlStyle-Font-Size="12pt"
                                            ControlStyle-Font-Bold="true"
                                            ButtonType="Button"
                                            headertext="Edit">
                                            <ControlStyle
                                                Font-Bold="True" 
                                                Font-Names="Cordia New" 
                                                Font-Size="10pt" 
                                                Height="20px" 
                                                Width="40px" ForeColor="Black">
                                            </ControlStyle>
                                        </asp:commandfield>
                                    </columns>
                                    <AlternatingRowStyle BackColor="White" />
                        </asp:GridView>
    All Gridview command is getting fired,but update button is not getting fired.
    Please help me to resolve this issue.

    Thanks,
    Shekhar
    Last edited by tlhintoq; Feb 23 '10, 06:07 PM. Reason: [CODE] ...Your code goes between code tags [/CODE]
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    TIP: When you are writing your question, there is a button on the tool bar that wraps the [code] tags around your copy/pasted code. It helps a bunch. Its the button with a '#' on it. More on tags. They're cool. Check'em out.

    Comment

    • MrMancunian
      Recognized Expert Contributor
      • Jul 2008
      • 569

      #3
      Put a breakpoint at switchGridView_ RowUpdating in your .vb-/.c-code and see what's wrong... If that doesn't work, post some code that handles the switchGridView_ RowUpdating...

      Steven

      Comment

      • semomaniz
        Recognized Expert New Member
        • Oct 2007
        • 210

        #4
        Can you post your code for row updating event (switchGridView _RowUpdating) ?

        Comment

        Working...