What I am doing is creating a custom pager control, which I add dynamically to all of my WebDataGrids. In that control, I have a button that fires a WebExcelExporter to export the contents of the grid to Excel. Problem is, my grid is in an UpdatePanel and I need to do a full postback. Problem is, when I do RegisterPostBackControl on that button, it has no effect. It seems to work fine if I just put the button in PagerTemplate on the page and get it with FindControl, but it won't work if I add the template dynamically or in my custom control either way. It also used to work fine when I had my custom pager in a user control.
Any idea why it is behaving like this?
Hi jbirzer,
You should make sure the RegisterPostBackControl method is called after the initialization of the templated button. Let me know if this helps.
Hello jbirzer,
I'm just checking if you have resolved your issue.