I have a custom control which is a wrapper around the ASPxGridView. This custom control is nested inside an UpdatePanel. In one of its columns I add a LinkButton, which I register by calling ScriptManager.RegisterPostBackControl.
The grid has paging enabled. Paging is of course done during an AsyncPostBack.
When the grid is showing its first page everything works as expected: the button is clicked causing a PostBack.
However, if the current page is not the first, clicking the button once does not cause a PostBack, and clicking it again (in fact clicking any button inside the column) raises an error.
This same error is thrown if I comment out the line that registers the button with the ScriptManager and click a button while on the first page.
So this leads me to think that the buttons in the first page get registered correctly because this is done during a PostBack, and that registration for the buttons in any other page fails (for some reason) because it is done during an AsyncPostBack.
Any thoughts? A possible solution?
Thanks in advance