I have a webpart. This webpart is having WebImageButton and UltraWebGrid controls. This button and grid controls were added to the WebAsyncRefreshPanel object.The button click event is registered using ClickHandler event handler. I am assigning Datasource in the clickeventhandler method. But,When I click the button it is doing full postback to load the grid.
There is anyway I can load the grid without doing full post back.Please respond ASAP.
Thanks,Cimetrix Team
A full postback from the WARP panel is usually an indication that something went wrong. Use an HTTP trace tool like WebDevelopment Helper or Fiddler to trace the HTTP request/response. I'm guessing the response for the WARP panel is initially a 500 indicating a server error. There should be a stack trace or something in that response which will help you identify the problem.
-tony
I removed the following method from my webpart class. Now, even though the button is still part of WARP, it is not firing any events. I set AUTOSUBMIT = false, and have seen the behaviour. Whether I set AUTOSUBMIT to either true or false, the behaviour is same. The events are not fired.
protected override void RenderContents(HtmlTextWriter writer)
{
...
}
Whenever working with custom webparts be sure to add any composite controls in the CreateChildControls override. You'll also want to call EnsureChildControls from inside of the OnInit override. By performing these two tasks, you'll ensure that all events get routed properly through the child controls. I'm guessing that in your case, the controls are being created too late in the lifecycle and when it's time to fire the button click event, the control doesn't exist yet.
-Tony
Now, I re- arranged code. It is able to fire event when I set AUTOSUBMIT =TRUE.But, it is doing full post back to load the grid. If I set AUTOSUBMIT = FALSE, it is not firing any event. It supposed to do Asynchronous Post back as the controls are part of WARP.
Am I missing anything here?
Thanks,
CIMETRIX TEAM
3 years later, no response.
HI Tony,
I submitted an incident with sample webpart code. The incident number is WDI1881. I would appreciate if someone can look into it and resolve this earliest.
Cimetrix Team.
There are possible reasons for the failure that I know of.
1) a server error occurs during the ajax call and a full postback ensues
2) the panel can't determine that the button is actually a child of it.
It may be best if you submit an incident with our Support Team, so that they can start creating a repro case.