Yii2 Grid Yii2 GridView on steroids
#1
Posted 20 March 2014 - 03:23 PM
#2
Posted 21 March 2014 - 08:28 AM
Kartik V, on 20 March 2014 - 03:23 PM, said:
FYI - the DEMO PAGE is online for this extension. The demo doubles up as a GridView configurator as well. You can configure various widget options dynamically and see the impact.
#4
Posted 21 March 2014 - 01:16 PM
I have looked at your other work at http://demos.krajee.com/ and you are building a very impressive set of tools for Yii 2.0. So far I have used your Yii2 Social module and your wiki on relationships.
Ultimately, I will probably use all your tools because I can see how useful they are. It's really great work, thanks for bringing so much to the Yii 2.0 framework so quickly.
#5
Posted 21 March 2014 - 07:18 PM
evercode, on 21 March 2014 - 01:16 PM, said:
Thanks. You may post feedback of your use in the extension forum or record any issue faced on github.
#6
Posted 28 March 2014 - 04:46 AM
Kartik V, on 21 March 2014 - 07:18 PM, said:
#7
Posted 28 March 2014 - 05:44 AM
Yudi Lee, on 28 March 2014 - 04:46 AM, said:
Refer to the documentation. You must setup and add a module named gridview in the `modules` section of your Yii Configuration file.
#8
Posted 03 April 2014 - 03:01 AM
when i try grid using filter type "GridView::FILTER_TIME", time picker show up on grid but the page kept refreshed again and again. sorry for my bad english in my explanation. Any ideas maybe i missing something in my setting
this is my code in index.php
<?= GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'hover' => true, 'responsive' => true, 'bootstrap' => 'true', 'columns' => [ ['class' => 'yii\grid\SerialColumn'], //'id', 'mobile_phone', [ 'attribute' => 'date', 'filterType' => GridView::FILTER_DATE, 'filterWidgetOptions' => [ 'options' => ['placeholder' => 'Enter date ...'], //this code not giving any changes in browser 'type' => DatePicker::TYPE_COMPONENT_APPEND, //this give error Class 'DatePicker' not found 'pluginOptions' => [ 'autoclose' => true, 'format' => 'yyyy-mm-dd' ], ], ], 'in_time', [ //this in where i put code to add time picker 'attribute' => 'out_time', 'filterType' => GridView::FILTER_TIME, 'filterWidgetOptions' => [ 'pluginOptions' => [ 'showSeconds' => true, 'showMeridian' => false, 'minuteStep' => 1, 'secondStep' => 1, 'disableMousewheel' => false ] ], ], [ 'attribute' => 'status', 'value' => function ($model, $index, $widget) { return $model->getStatusText(); }, 'filter' => array("O" => "Out Of Town", "B" => 'Blank', "R" => "Revisi"), ], ['class' => 'yii\grid\ActionColumn'], ], 'panel' => [ 'heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-globe"></i> Data Absen </h3>', 'type' => 'success', 'before' => (Html::a('<i class="glyphicon glyphicon-plus"></i> Create Absen', ['create'], ['class' => 'btn btn-success']) . ' ' . Html::a('<i class="glyphicon glyphicon-repeat"></i> Reset Grid', ['index'], ['class' => 'btn btn-info'])), 'showFooter' => false ], ]); ?>
#9
Posted 04 April 2014 - 11:17 PM
Yudi Lee, on 03 April 2014 - 03:01 AM, said:
The NAMESPACE folks! Use fully namespaced classes always. You may learn about using PHP Namespaces if its not clear. This is very important if you are coding in Yii2 and > PHP v5.3
For your case, this should work:
// 'type' => \kartik\widgets\DatePicker::TYPE_COMPONENT_APPEND //
or this
use kartik\widgets\DatePicker; // 'type' => DatePicker::TYPE_COMPONENT_APPEND //
#10
Posted 07 April 2014 - 12:46 AM
[ 'attribute' => 'out_time', 'filterType' => GridView::FILTER_TIME, 'filterWidgetOptions' => [ 'pluginOptions' => [ 'showSeconds' => true, 'showMeridian' => false, 'minuteStep' => 1, 'secondStep' => 1, 'disableMousewheel' => false ] ], ],
Kartik V, on 04 April 2014 - 11:17 PM, said:
For your case, this should work:
// 'type' => \kartik\widgets\DatePicker::TYPE_COMPONENT_APPEND //
or this
use kartik\widgets\DatePicker; // 'type' => DatePicker::TYPE_COMPONENT_APPEND //
#11
Posted 15 October 2014 - 05:08 AM
I am using your widget grid and it working awesome but I have a little question, can we use price range as filter like I need something like first I select any condition in dropdown like <, >, <=, >= and etc and then a text box where I can enter digit so now the filter result will be combination of condition and digit. Like get all products whose price is <= 10.
I just need to ask is it possible in your grid widget? If yes then please let me know how as soon as possible.
Thanks in advance.
#12
Posted 15 October 2014 - 05:32 AM
But you could achieve the ranges for various use cases by using special filter widgets like INPUT_SLIDER and DATE_RANGE (from my other extensions).
#13
Posted 03 April 2015 - 04:18 AM
i store timestamp in database and i want to filter dusing datepicker so please help me how to i filter date..?
#15
Posted 25 December 2015 - 10:07 AM
Question is:
I have two gridviews that originate from the same model and are placed on the same page. I need it that way because grids show different sets of data. Now problem: when I apply date-rage filter it gets id composed of classname-attribute (id="documents-assigned_at") and in the first grid everything works as expected but in the second grid date-rage filter does not initialize at all. I suppose it is due to the same id value but I can not change it. I've tried in many ways but I guess when date-range and any other of your widgets are assigned as filters to some gridview it internally overwrites id value to classname-model attribute. Is it possible to change id for widgets when they are used as filters?
Same problem is with Select2 widget, for example.
Thanks in advance.