I have DropDownList inside GridView. Now I would like to add event handler for dropdownlist which would react on SelectedIndexChanged.
I’m nesting DropDownList inside GridView by using RowDataBound event for GridView.
(http://www.highoncoding.com/Articles/169_DropDownList_Inside_GridView__Method_1_.aspx)
Can anybody help me, and tell me how to add event handling for dropdownlist, please?
I have DropDownList inside GridView. Now I would like to add event handler for
Share
ok, the issue I’ve had is solved.
To handle
SelectedIndexChangedfor DropDownList nested inside GridView you have to just setAutoPostbackproperty totrueand point SelectedIndexChange event to some procedure.The cause of issue I had was that I didn’t check in Page_Load function (during binding data to GridView) following rule:
If Not Page.IsPostBack Then. And that’s all. So don’t forget to do it please! 🙂