From 8e4c6a85a6ca14814d305d2e1f5b1da56cba74ac Mon Sep 17 00:00:00 2001 From: rojaro <> Date: Thu, 2 Sep 2010 08:55:46 +0000 Subject: fixed #286 --- framework/Web/UI/WebControls/TBoundColumn.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'framework/Web/UI') diff --git a/framework/Web/UI/WebControls/TBoundColumn.php b/framework/Web/UI/WebControls/TBoundColumn.php index fdcde9b2..098ffeef 100644 --- a/framework/Web/UI/WebControls/TBoundColumn.php +++ b/framework/Web/UI/WebControls/TBoundColumn.php @@ -197,6 +197,7 @@ class TBoundColumn extends TDataGridColumn $control->setItemType($item->getItemType()); } $cell->getControls()->add($control); + $cell->registerObject('EditControl',$control); } else { @@ -206,7 +207,20 @@ class TBoundColumn extends TDataGridColumn } } else - $control=$cell; + { + if(($classPath=$this->getItemRenderer())!=='') + { + $control=Prado::createComponent($classPath); + if($control instanceof IItemDataRenderer) + { + $control->setItemIndex($item->getItemIndex()); + $control->setItemType($item->getItemType()); + } + $cell->getControls()->add($control); + } + else + $control=$cell; + } $control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); break; default: -- cgit v1.2.3