tz_com 2011-03-03 09:01:05 4071次浏览 10条回复 0 0 0

1、[attach]1[/attach]什么意思…… 2、[attach]2[/attach]到底干啥用的啊? 3、[attach]3[/attach]怎么修改他?假如我要改时间的格式! 等待舰长~

  • 回复于 2011-06-21 10:20 举报

    威武舰长

  • 回复于 2011-06-21 09:01 举报

    舰长威武~!

  • 回复于 2011-03-03 10:22 举报

    哦,知道了 谢谢舰长啦~

  • 回复于 2011-03-03 10:13 举报

    这个是单个属性搜索,看文档有个filter属性,这个一般是model的值,如果不需要此功能,就把filter去掉就行了!

  • 回复于 2011-03-03 10:12 举报

    怎么传上去就成这样了……郁闷

  • 回复于 2011-03-03 10:11 举报

    [attach]4[/attach] 我不太明白这块是干啥用的……

  • 回复于 2011-03-03 09:28 举报

    如果看不懂文档的话,肯定是做不成项目的,一些问题从文档都可以查到!

    $this->widget('zii.widgets.grid.CGridView', array(
        'dataProvider'=>$dataProvider,
        'columns'=>array(
            'title',          // display the 'title' attribute
            'category.name',  // display the 'name' attribute of the 'category' relation
            'apiContent:html',   // display the 'apiContent' attribute as purified HTML
            array(            // display 'create_time' using an expression
                'name'=>'create_time',
                'value'=>'date("M j, Y", $data->create_time)',
            ),
            array(            // display 'author.username' using an expression
                'name'=>'authorName',
                'value'=>'$data->author->username',
            ),
            array(            // display a column with "view", "update" and "delete" buttons
                'class'=>'CButtonColumn',
            ),
        ),
    ));
    

    这是文档的例子,你看一下就会明白了!
    CGridView
    这一页里有CGridView的属性和方法!需要什么就改什么,特别方便!

  • 回复于 2011-03-03 09:26 举报

    知道了,看到能看懂的地方了

  • 回复于 2011-03-03 09:23 举报

    文档看不懂呢…………

  • 回复于 2011-03-03 09:16 举报

    这个好改!不看文档和文盲差不多,哈哈!
    看文档就会明白:
    CGridView

您需要登录后才可以回复。登录 | 立即注册