Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7703457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:27:48+00:00 2026-05-31T23:27:48+00:00

I am using CGridView in Yii, how can I display a single record in

  • 0

I am using CGridView in Yii, how can I display a single record in 2 lines?

Basically I want to show a record details in 1st row of table and on other row I want to display its summary, I tried it with div and css but can’t get proper results, is anyone there who can help me in this case?

I am using like this:

<?php 

$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'bidding-grid',
'itemsCssClass' => 'data-default',
'dataProvider'=>$model,
'summaryText' => '',
'columns'=>array(
    'people_detail_for_bid.Person' => array(
                        'type'=>'raw',
                        'name'=>'people_detail_for_bid.Person',
                        'value'=>'Yii::app()->Controller->createUserNameLink($data->people_detail_for_bid->PeopleFirstName." ".$data->people_detail_for_bid->PeopleLastName, $data->people_detail_for_bid->PeopleId).
                        "<br><span class=decriptionText>".$data->people_detail_for_bid->PeopleDesignation."</span>".
                        "<br><span class=decriptionText>".$data->people_detail_for_bid->PeopleEmail."</span>"',
                        'htmlOptions'=>array('width'=>200),
    ),
    'timeAgo' => array(
                        'type'=>'raw',
                        'name'=>'timeAgo',
                        'value'=>'"<span class=decriptionText>".Yii::app()->Controller->_ago($data->PBPostedOn)."</sapn>"',
                        'htmlOptions'=>array('width'=>150),
    ),

),

)); 

?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T23:27:49+00:00Added an answer on May 31, 2026 at 11:27 pm

    After too much search .. and I tried with different ways now finally got a solution for this .. that solution is basically a kind of 2nd way to do anything not actual way .. but it works to me ..

    .....
    .....
    
        'timeAgo' => array(
                            'type'=>'raw',
                            'name'=>'timeAgo',
                            'value'=>'"<span class=decriptionText>".Yii::app()->Controller->_ago($data->PBPostedOn)."</sapn></td></tr><tr><td colspan=\"6\"><span class=decriptionText>".$data->PBSummary."</span>"',
                            'htmlOptions'=>array('width'=>150),
        ),
    
    .....
    .....
    

    added some table tags on last column to close row and added another one.

    hope it works for all ..

    thanks ..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In yii's CGridView I can get the current row number by using $row .
I am having an issue with Yii relations. I am using CGridView to display
I am using CGridView to show data in grid format, but i am not
In my project, i am using cgridview to display some information and using the
In my project, i am using a cgridview to show records corresponding to the
In my CGridView the table generated by the grid method is using a default
I want to display different images using gridview in android? Xml file: <?xml version=1.0
Hi i m using GridView with hovermenu and i want that when we click
I have a ListView which is using a GridView to display a DataTable and
How to show in the WPF Listview using the GridView an empty text (like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.