control in datagrid form gone after issuing dtg refresh
Mon, 07/27/2009 - 21:17
i've recreate test using examples/datagrid/links_images.php
add button to this page, and issuing dtg refresh on action will remove all the control such as button or image control. Actually it is still rendered on the page but it has [CDATA things from ajax, i use qcube 1.1 snapshot about a weeks ago.
my modification to the links_images.php file is:
1. add declaration,
protected $btnTest;
2. add this into Form_Create
$this->btnTest = new QButton($this);
$this->btnTest->Text = 'test';
$this->btnTest->AddAction(new QClickEvent(), new QAjaxAction('btnTest_Click'));3.add function handler
public function btnTest_Click(){
$this->dtgPersons_Bind();
$this->dtgPersons->Refresh();
}and add btnTest->Render() in links_images.tpl.php of course.
then i start the page, and hit the test button, then all image and button is gone, am i wrong or is that something there?
thanks.
ratno

Were you able to fix this problem? I am running into the same issue.
Button's parent should be the datagrid, not the QForm. Let me know if this makes sense.
Hello guys.
I have a similar problem : After Refresh() my Datagrid in QPanel, my images controls in Datagrid are surrounded by
<!--[CDATA[:<!--[CDATA[<img id=""...... />
]]>
I use Qcube 2.0.1. I have not found the solution of this problem in this forum.
Thank you.
I'm using QCubed 2.0.2 and whenever I create a panel through an AJAX request I'm seeing the closing tag for the CDATA (i.e. ]]>) left on the page. I haven't traced through to see what the source of this problem is, but all my other AJAX requests don't cause it. For now I have switched those calls to standard Server POST backs.
Thank you Alex, I had the same problem and setting the parent to the datagrid fixed it!