Index Column for CGridView

how can i add a column like that ?

additionally it would be perfect if i can show a spesific page with a spesific index number :)

are you using CGridView? if so then when initiating widget

$this->widget('zii.widgets.CGridView', array(


	// add columns manualy


		// add number



			// an array of class and method wich will be called with call_user_func_array

			'value'=>array('MyClass', 'myMethod')







//the callback function 

class MyClass


	public static function myMethod($data, $row, $component)


		//the $data is the ActiveRecord Model collection from the dataProvider

		//the $row is the data row

		//the $component is the CGridColumn object for each columns


		// return the result you want