diff options
author | xue <> | 2006-06-13 02:21:37 +0000 |
---|---|---|
committer | xue <> | 2006-06-13 02:21:37 +0000 |
commit | df05d222194535b6039975a1877bc61455d1abee (patch) | |
tree | 9b32dd2a052906d486fe3db5fd8c68a5359a55a7 /framework/Web/UI/WebControls/TRepeater.php | |
parent | 0fbba632e80e8a2d0327fea6c5ef86972494a8eb (diff) |
TRepeater, TDataList and TDataGrid will store data indices in DataKeys if DataKeyField is not set.
Diffstat (limited to 'framework/Web/UI/WebControls/TRepeater.php')
-rw-r--r-- | framework/Web/UI/WebControls/TRepeater.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TRepeater.php b/framework/Web/UI/WebControls/TRepeater.php index 2070cb1a..9c1cc4ac 100644 --- a/framework/Web/UI/WebControls/TRepeater.php +++ b/framework/Web/UI/WebControls/TRepeater.php @@ -443,10 +443,12 @@ class TRepeater extends TDataBoundControl implements INamingContainer $items=$this->getItems();
$itemIndex=0;
$hasSeparator=$this->_separatorTemplate!==null;
- foreach($data as $dataItem)
+ foreach($data as $key=>$dataItem)
{
if($keyField!=='')
$keys->add($this->getDataFieldValue($dataItem,$keyField));
+ else
+ $keys->add($key);
if($itemIndex===0 && $this->_headerTemplate!==null)
$this->_header=$this->createItemInternal(-1,self::IT_HEADER,true,null);
if($hasSeparator && $itemIndex>0)
|