GridView RowCommand event not firing

前端 未结 10 676
粉色の甜心
粉色の甜心 2020-12-06 09:42

I have a GridView that looks something like this:



        
相关标签:
10条回答
  • 2020-12-06 10:34

    I fixed my version of this problem by removing all event handlers from the GridView, then rebuilding the code, then adding them back in one at a time.

    0 讨论(0)
  • 2020-12-06 10:35

    My problem was requiredfieldvalidator

    Solution to that was: I disable it at post back and then re-enable it after the row command.

    0 讨论(0)
  • 2020-12-06 10:38

    Use CausesValidation="false" in button tag. It can solve the problem.

    0 讨论(0)
  • 2020-12-06 10:42

    If your code is like this:

    protected void Page_Load(object sender, EventArgs e)
    {
        BindGrid(dgv);
        if (!IsPostBack)
        {
    
        }
    }
    

    Put BindGrid() inside the !isPostBack block

    0 讨论(0)
提交回复
热议问题