summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/JuiControls/Samples/TJuiSelectable/Home.php
blob: cf8d40f12651d66d97deed42acf7d3f00d29c466 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php

class Home extends TPage
{
	protected $data = array(
		'PRADO',
		'quickstart',
		'tutorial',
		'sample',
		'for the',
		'TJuiSortable',
		'control',
		);

	public function onLoad($param)
	{
		if(!$this->IsPostback)
		{
			$this->repeater1->DataSource=$this->data;
			$this->repeater1->dataBind();
		}
	}

	public function repeater1_onSelectedIndexChanged($sender, $param)
	{
		$this->label1->Text="Selected items:";
		$items = $param->getSelectedIndexes();

		foreach($items as $index)
			$this->label1->Text.=' '.$this->data[$index];
	}
}