Ejemplo n.º 1
0
 /**
  * Construct the table
  *
  * @param string id
  */
 public function __construct($id)
 {
     parent::__construct($id);
     $this->model = Kendo::createModel()->setId('id');
     $this->dataSource = Kendo::createDataSource()->setSchema(['model' => $this->model, 'data' => 'results', 'total' => 'count'])->setServerFiltering(true)->setServerSorting(true)->setServerPaging(true);
     $this->widget = Kendo::createGrid('#' . $this->_id)->setDataSource($this->dataSource)->setSortable(['allowUnsort' => false]);
 }
Ejemplo n.º 2
0
 /**
  * Construct the select
  *
  * @param string id
  */
 public function __construct($id)
 {
     parent::__construct($id);
     $this->dataSource = Kendo::createDataSource()->setSchema(['data' => 'results', 'total' => 'count'])->setServerFiltering(true)->setServerPaging(true);
     $this->widget = Kendo::createDropDownList('#' . $id)->setDataSource($this->dataSource)->setDataValueField('id')->setDataTextField('name');
     $this->addAttribute('name', $id);
 }
Ejemplo n.º 3
0
 /**
  * Construct the chart
  *
  * @param string id
  */
 public function __construct($id)
 {
     parent::__construct($id);
     $this->model = Kendo::createModel()->setId('id');
     $this->dataSource = Kendo::createDataSource()->setSchema(['model' => $this->model, 'data' => 'results', 'total' => 'count'])->setServerFiltering(true);
     $this->widget = Kendo::createChart('#' . $id)->setDataSource($this->dataSource);
 }