GridView OnSelectedIndexChanged event not firing

前端 未结 6 2237
谎友^
谎友^ 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:30

    It's possible that you need to wire up the custom event to the control. Try something like this when first creating the control in the code-behind:

    // Add event handler dynamically using C# syntax.
      GridView1.onselectedindexchanged += this.GridView1_SelectedIndexChanged2;
    

提交回复
热议问题