Questions tagged [zii-widgets]

22 questions
6
votes
3 answers

Yii CGrid pagination and sorting with CArrayDataProvider doesnt work

I built a custom function in my model and return the raw data: function(){ ... $connection=Yii::app()->db; $command=$connection->createCommand($sql); $rows=$command->queryAll(); return $rows; } $campModel = $model->function.. I then use those rows…
Danny Valariola
  • 1,118
  • 5
  • 26
  • 41
3
votes
2 answers

How to fill other value after calendar is clicked in Yii's CJuiDatepicker

I have a problem to set the value of checkout date after calendar date is clicked. Here is the code. I try to fill value of check_out_date by give function onSelect, but nothing changes to target input value. Can anyone help me to give a…
xent
  • 31
  • 1
  • 3
3
votes
2 answers

Check that the date entered is not already passed

I have a date field in a form widget CActiveForm. The date field is a CJuiDatePicket widget. I would like to put a control so that the user can not enter a date that is in the past. My code is
mortiped
  • 869
  • 1
  • 6
  • 28
2
votes
3 answers

Inserting Active Record Data into Yii's CGRidView widget

I have a table in mysql that I want to display with the CGridView widget. Here is my code thus far: My Controller file (snipped of course): public function actionIndex() { //call the AR table model $model = new ViewResults(); //This generates…
k to the z
  • 3,217
  • 2
  • 27
  • 41
2
votes
1 answer

Yii zii.widgets.grid.CGridView custom field

I am new to yii. In my blocked-recruiter view's admin.php page i have a CGridView widget. the candidate_id is the foreign key of candidate table. So now in blocked recruiter view the candidate_id is coming by default. But i want to show the…
Sudipta Dhara
  • 608
  • 1
  • 5
  • 21
1
vote
1 answer

How to do not reset search results in Yii zii.widgets.grid.cgridview

I have zii.widgets.grid.cgridview on admin page, and when I search some records and visit view one of them, and after return to admin page results is reseted. May I save them someway?
Dmitry Borovkov
  • 289
  • 4
  • 16
1
vote
2 answers

How to put default value in CJuidatepicker in Yii?

I have the code below to display a calendar input in Yii form. widget('zii.widgets.jui.CJuiDatePicker', array( 'name' => 'publish_date', 'attribute' => 'publish_date', 'model'=>$model, …
hd.
  • 17,596
  • 46
  • 115
  • 165
1
vote
1 answer

What is wrong with the statement,in Yii?

I have a folowing code in my controller , public function actionViewJob() { $user_id = Yii::app()->session['user_id']; /* For User Authentication */ if (Yii::app()->user->getId() === null) …
saji
  • 201
  • 1
  • 5
  • 19
1
vote
2 answers

Yii - Self Referencing Table

This is my category table id category parent_category_id 1 animal NULL 2 vegetable NULL 3 mineral NULL 4 doggie 1 5 potato 2 6 hunting 4 my yii grid view shows parent category id instead of name. how can i display…
Anooj P
  • 346
  • 4
  • 16
1
vote
1 answer

Specify the same itemView for several views in YII?

I have the following directory structure: -> views ---> product |- view.php |- gridView.php ---> site |- index.php gridView.php is a partial view that I wish to use in index.php under site. If I copy gridView.php to site/gridView.php, the…
rockstardev
  • 13,479
  • 39
  • 164
  • 296
0
votes
1 answer

Customized ClistView to hide some information

This is my UserController, index Action, zii generated file , from my model User: /** * Lists all models. */ public function actionIndex() { $dataProvider=new CActiveDataProvider('User'); $this->render('index',array( …
greu
  • 35
  • 4
0
votes
1 answer

How to implement a filter on Yii 1.1 CGridView on data retrieved with join query

I'm trying to implement a filter on an admin view using 'zii.widgets.grid.CGridView'. As the title says, the data is retrieved by a query (a quite complex one, it has 6 left joins actually), and is given to the widget a CArrayDataProvider. The…
0
votes
2 answers

yii - use of class for CGridView's column shows php warning

I need to apply a CSS class to one CGridView's column and I'm getting a PHP notice error This is the code $this->widget('zii.widgets.grid.CGridView', array( 'htmlOptions'=>array('class'=>'table table-striped table-bordered…
MeV
  • 3,761
  • 11
  • 45
  • 78
0
votes
1 answer

how to open a view by CJuiDialog in Yii?

I want to open a view by calling its action in the CJuiDialog, here is my code : beginWidget('zii.widgets.jui.CJuiDialog', array( 'id' => 'Exe1', 'options' => array( 'title' => 'URL + Key', 'autoOpen' => false, …
MD.MD
  • 708
  • 4
  • 14
  • 34
0
votes
2 answers

Retreving specific row from database in yii

I am working on a job site,And want to show only the jobs posted by a particular user in cgridview.My actuall aim is to authenticate the user so that only jobs posted by him/her will be visible in cgridview.I have done the following stuff,but not…
saji
  • 201
  • 1
  • 5
  • 19
1
2