Yii Framework Forum: Yii2 Grid - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yii2 Grid Yii2 GridView on steroids

#1 User is offline   Kartik V 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 626
  • Joined: 29-August 12

Posted 20 March 2014 - 03:23 PM

Just opened up this extension for release and working on the demo page. The extension includes various enhancements to the GridView widget and enhanced/new grid columns. Refer documentation details and features here and let know of any feedback.
1

#2 User is offline   Kartik V 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 626
  • Joined: 29-August 12

Posted 21 March 2014 - 08:28 AM

View PostKartik V, on 20 March 2014 - 03:23 PM, said:

Just opened up this extension for release and working on the demo page. The extension includes various enhancements to the GridView widget and enhanced/new grid columns. Refer documentation details and features here and let know of any feedback.

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.
0

#3 User is offline   stromgol 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 16-March 13

Posted 21 March 2014 - 09:04 AM

Great work, once again.

Thank you very much!
0

#4 User is offline   evercode 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 110
  • Joined: 23-December 12

Posted 21 March 2014 - 01:16 PM

This is really awesome! Not only is the extension great, but you are supporting it nicely with the demo page, so we can see how it works and how cool the features really are.

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.
0

#5 User is offline   Kartik V 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 626
  • Joined: 29-August 12

Posted 21 March 2014 - 07:18 PM

View Postevercode, on 21 March 2014 - 01:16 PM, said:

This is really awesome! Not only is the extension great, but you are supporting it nicely with the demo page, so we can see how it works and how cool the features really are.

Thanks. You may post feedback of your use in the extension forum or record any issue faced on github.
0

#6 User is offline   Yudi Lee 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 31-March 11
  • Location:Surabaya, Jawa Timur

Posted 28 March 2014 - 04:46 AM

First, Thanks for this awesome widget and new export ability. i have already try your grid widget but when i clicking export to csv/text/html/excel it bring me to 'gridview/export/download' like mentioned in module. But in my experience that action(gridview/export/download) generate 404 not found when that action launched. sorry for my bad english. Thanks

View PostKartik V, on 21 March 2014 - 07:18 PM, said:

Thanks. You may post feedback of your use in the extension forum or record any issue faced on github.

0

#7 User is offline   Kartik V 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 626
  • Joined: 29-August 12

Posted 28 March 2014 - 05:44 AM

View PostYudi Lee, on 28 March 2014 - 04:46 AM, said:

First, Thanks for this awesome widget and new export ability. i have already try your grid widget but when i clicking export to csv/text/html/excel it bring me to 'gridview/export/download' like mentioned in module. But in my experience that action(gridview/export/download) generate 404 not found when that action launched. sorry for my bad english. Thanks

Refer to the documentation. You must setup and add a module named gridview in the `modules` section of your Yii Configuration file.
0

#8 User is offline   Yudi Lee 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 31-March 11
  • Location:Surabaya, Jawa Timur

Posted 03 April 2014 - 03:01 AM

I try grid with filter type "GridView::FILTER_DATE", it works. but when i using filter widget option and add option 'type' => DatePicker::TYPE_COMPONENT_APPEND, it gave me error "Class 'DatePicker' not found" also when i add 'options' => ['placeholder' => 'Enter date ...'] it not works but not giving error.

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']) . '&nbsp;' . Html::a('<i class="glyphicon glyphicon-repeat"></i> Reset Grid', ['index'], ['class' => 'btn btn-info'])),
            'showFooter' => false
        ],
    ]);
    ?>

0

#9 User is offline   Kartik V 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 626
  • Joined: 29-August 12

Posted 04 April 2014 - 11:17 PM

View PostYudi Lee, on 03 April 2014 - 03:01 AM, said:

I try grid with filter type "GridView::FILTER_DATE", it works. but when i using filter widget option and add option 'type' => DatePicker::TYPE_COMPONENT_APPEND, it gave me error "Class 'DatePicker' not found"

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
//

0

#10 User is offline   Yudi Lee 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 31-March 11
  • Location:Surabaya, Jawa Timur

Posted 07 April 2014 - 12:46 AM

Yes, it works. Thank you. Can i add date picker using type date range in grid? when i add time picker the page keeps reloading, i add using code like this

[
                'attribute' => 'out_time',
                'filterType' => GridView::FILTER_TIME,
                'filterWidgetOptions' => [
                    'pluginOptions' => [
                        'showSeconds' => true,
                        'showMeridian' => false,
                        'minuteStep' => 1,
                        'secondStep' => 1,
                        'disableMousewheel' => false
                    ]
                ],
            ],



View PostKartik V, on 04 April 2014 - 11:17 PM, 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
//


0

#11 User is offline   mayankb 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 15-October 14

Posted 15 October 2014 - 05:08 AM

Hello Kartik,

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.
0

#12 User is offline   Kartik V 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 626
  • Joined: 29-August 12

Posted 15 October 2014 - 05:32 AM

Not exactly to the level of operator comparison as you have - because the filter functionality mostly is still yii2 default which is a simple form submission.

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).
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users