GridView OnSelectedIndexChanged event not firing

前端 未结 6 2230
谎友^
谎友^ 2020-12-16 19:10

I am trying to get the selected row of the GridView, and I know that I should be able to get that information based on the OnSelectedIndexChanged e

6条回答
  •  攒了一身酷
    2020-12-16 19:21

    It's been a few years since this question was asked and I certainly hope the person with the problem got it figured out but I had the same problem and thanks to one of the responders I figured out what the problem was.

    Check the actual button line in the Gridview and make sure that you have the CommandName="Select" in the ButtonField. For some reason that code, which is normally entered automatically wasn't added.

提交回复
热议问题