Update QPanel after Ajax Call

Login or register to post comments
3 replies [Last post]
Offline
Joined: 01/24/2009

I need a method called in a QPanel after every AJAX call on QForm using a specific panel. Is there any method I can override on QPanel that could achieve this?

alex94040's picture
Offline
Joined: 11/06/2008

I'm confused. Can you provide a tad more context, please?

Offline
Joined: 01/24/2009

Well, I was thinking there may be a method that is called on QPanels that is similar to Form_PreRender on QForms. That way, on every post back, I could have the QPanel updated without it having to be explicitly told to be updated from a QForm. This is similar to the DataGrid with Inline Editing example. The put QDataGrid->Refresh() on the Form_PreRender method so it would update on every button click, only I want a QPanel to be updated on every button click without having to explicitly tell the QPanel to be updated on every page it is used. I was hoping the QPanel could handle it's own update on every call back, including Ajax ones.

OOPMan's picture
Offline
Joined: 11/07/2008

Er, I think you would need to override something in your QForm to do this...

I think if you added something like:

protected function TriggerActions($strControlIdOverride = null)
{
  if($this->strCallType == QCallType::Ajax) $this->pnlSomething->doPreActionsSomething();
  parent::TriggerActions($strControlIdOverride);
  if($this->strCallType == QCallType::Ajax) $this->pnlSomething->doPostActionsSomething();
}

to you QForm which needs this behaviour you could achieve the desired effect...