When I have a WebGrid up with multiple pages, and I click on the page number to change the page, I notice (in the debugger) that the events fire: Page_Init, Page_Load, Page_Unload. But Page_PreRender does not fire. It also seems like the rest of the page (besides the grid) does not really get refreshed. For example, I see a TextBox's value change during the Load event, but when the page comes up the TextBox is back to its old value.
Does anyone know what is going on here, and what is the best way to get the whole page to get refreshed when the user changes the page on the grid?
Hello,
> TextBox's value change during the Load event, but when the page comes up the TextBox
>is back to its old value.
Please notice that during an Ajax call, you cannot change the values of GUI controls from C# (on the server-side events)
Only after the Ajax call is finished, only in JavaScript you can change the values of GUI controls.
Exception is WARP, which makes a special kind of Ajax call allowing to change GUI controls from C# (on the server-side events)
Search the old forum as well. There is plenty of good advice.
http://forums.archive.infragistics.com/readgroup?group=infragistics.products.netadvantage.aspnet.webgrid
No Warp. No InitializeDataSourceEventHandler on Page_Init.
I had Ajax checked. When I unchecked it, the PreRender was fired on the WebGrid Page change. Thanks for the idea. My data source is small enought that I might not need Ajax.
So, how do you find out what Ajax does and doesn't do regarding event handling? It would still be good to have the option of leaving it there.
1) Do you use Warp ?
or
2) Do you use the built-in Ajax support existing in the WebGrid ?
You don't mention anything about the 'InitializeDataSourceEventHandler' event handler. Have you wired this handler on Page_Init ?