Dialog widget with cgridview using render partial

Hi all, I’m trying to make a header detail view on my website. User will be able to add detail record using render partial method. Inside the _detail.php view, there will be a dialog with cGridView. Once user clicks on a field it will pop the dialog.

This is how I render the detail view using ajax:


$this->renderPartial('_detail', array(

				'jurnalBerulang' => $jurnalBerulang,

				'tabelPerkiraan'=>$tabelPerkiraan,

				'tabelPerkiraanDataProvider' => $tabelPerkiraanDataProvider

			), false, true);

The problem is that each time I click the add detail button, the gridview is always displayed first and after all the scripts finished loading, it disappears and all functions are working fine. I would like to eliminate the appearing and disappearing behavior of the gridview. Any idea? Thanks a lot.