Yii Framework Forum: Updating Ctreeview On Timer - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Updating Ctreeview On Timer Rate Topic: -----

#1 User is offline   jautry 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 37
  • Joined: 30-July 13

Posted 17 August 2013 - 04:44 PM

I am running a periodicalupdater timer, and need to use it to update a CTreeView. What is the best approach for this, as there seems to be no equivalent view update JS routine as there is for a CGridView. THX.
0

#2 User is offline   Gerhard Liebenberg 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 343
  • Joined: 07-January 12
  • Location:Stillbay - Western Cape - South Africa

Posted 18 August 2013 - 10:16 AM

One option is to re-execute the controller action that rendered the tree view in the first place.

If your tree is in a DIV, then you can use an Ajax function to send a request to the controller action, and then update the DIV with the response.

If your tree is in an iframe, you can reset the iframe's 'source', which will also send a request to the controller action and update the iframe with the response.
0

#3 User is offline   jautry 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 37
  • Joined: 30-July 13

Posted 18 August 2013 - 03:33 PM

I tried calling the controller function which renders the tree, but the tree does not seem to update despite seeing the data being updated properly. Not sure what is going on, I still have a lot to learn about this stuff. THX.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users