CGridView column display problem in google chrome

Hi All,

I am getting some problem with a CGridView.

Column are not showing in proper format in Google chrome. I am using a default layout “Column2” and my Gii Generated CRUD CGrid view is not displaying proper with 2 column layout. :(

I have tried a htmlOptions also for a columns.




<?php $this->widget('zii.widgets.grid.CGridView', array(

	'id'=>'script-grid',

	'dataProvider'=>$model->search(),

	//'filter'=>$model,

    'enableSorting'=>false,

	'columns'=>array(

		array('name'=>'id',

		 'htmlOptions'=>array('width'=>'40px'),

		),

		array('name'=>'code',

		 'htmlOptions'=>array('width'=>'40px'),

		),

		'position',

		 array(

                'class'=>'CButtonColumn',

                'template'=>'{update}{delete}',

          )),

)); ?>



But still not able to fix this problem in Google chrome. CGrid View is displaying fine in FF but it not proper in GOOGLE CHROME.

Anybody can help me…

Thanks in Advance !!

Hi did you ever solve this issue with chrome? I have encountered the same issue.

Hello,

What’s the issue you’re encountering exactly?

Actually it is the same issue as listed above. You can see an image of it here:

The layout in chrome doesn’t fit on the screen whereas on firefox it does.

Thanks,

Aaron

Hi again Aaron,

You have probably to:

[list=1]

[*]set the widget’s table width

[*]set the widget’s table ‘table-layout’ CSS property to fixed

[*]set the relevant column widths

[/list]

See http://stackoverflow.com/questions/1057574/html-td-wrap-text

You can also post CGridView code in any case.

Cheers

Excellent, that fixed it! Applying -


table-layout:fixed

to the table worked.

Thanks! =)

Aaron