1. #1
    Ext User
    Join Date
    Feb 2008
    Posts
    12
    Vote Rating
    0
    snow is on a distinguished road

      0  

    Default Multiline Grid

    Hi,

    I'm having some trouble displaying a cell over multiple lines, I've tried adding a css
    attribute white-space:normal but still no luck, any pointers?

    Thanks

    Code:
    	Ext.onReady(function() {
    	
    	var myData = [
    	['<a href=/prod/syslog.pl?mode=syslog&act=edit&id=10&type=ID&stage=1>10</a>',
     '<a href=/prod/syslog.pl?mode=syslog&act=edit&id=10&type=SysLogTag&stage=1>rsyslogd:</a>',
    
    '<a href=/prod/syslog.pl?mode=syslog&act=edit&id=10&type=DeviceReportedTime&stage=1>2008-05-13 15:59:04</a>',
    
    '<a href=/prod/syslog.pl?mode=syslog&act=edit&id=10&type=Facility&stage=1>5</a>',
    
    '<a href=/prod/syslog.pl?mode=syslog&act=edit&id=10&type=Priority&stage=1>3</a>',
    
    '<a href=/prod/syslog.pl?mode=syslog&act=edit&id=10&type=Message&stage=1>Warning: backward compatibility layer added to following directive to rsyslog.conf: MarkMessagePeriod 1200</a>',
    
    '<a href=/prod/syslog.pl?mode=syslog&act=edit&id=10&type=SysLogTag&stage=1>rsyslogd:</a>',
    
    '<a href=/prod/syslog.pl?mode=syslog&act=delete&id=10>Delete</a>']
    	];
    	
    	var myReader = new Ext.data.ArrayReader({}, [
    	{name: 'ID'},
    	{name: 'Host'},
    	{name: 'Date_Time'},
    	{name: 'Facility'},
    	{name: 'Priority'},
    	{name: 'Message'},
    	{name: 'Tag'},
    	{name: 'Delete'}
    	]);
    
    	var grid = new Ext.grid.GridPanel({
    		store: new Ext.data.Store({
    			data: myData,
    			reader: myReader,
    			collapsible: true
    		}),
    	
    		columns: [
    		{header: 'ID', css: 'white-space:normal;', width: 20, sortable: true, dataIndex: 'ID'},
    	{header: 'Host', css: 'white-space:normal;', width: 100, sortable: true, dataIndex: 'Host'},
    	{header: 'Date_Time', css: 'white-space:normal;', width: 120, sortable: true, dataIndex: 'Date_Time'},
    	{header: 'Facility', css: 'white-space:normal;', width: 60, sortable: true, dataIndex: 'Facility'},
    	{header: 'Priority', css: 'white-space:normal;', width: 60, sortable: true, dataIndex: 'Priority'},
    	{header: 'Message', css: 'white-space:normal;', width: 350, sortable: true, dataIndex: 'Message'},
    	{header: 'Tag', css: 'white-space:normal;', width: 80, sortable: true, dataIndex: 'Tag'},
    	{header: 'Delete', width: 60, css: 'white-space:normal;', sortable: true, dataIndex: 'Delete'}
    	],
    		viewConfig: {
    			forceFit:  true, 
    			autoFill : true
    		},
    		renderTo: 'dgrid',
    		title: 'Syslog Management',
    		width: 700,
    		enableRowHeightSync: true,
    		frame: true,
    		id: 'grid'
    	});
     
    	grid.getSelectionModel().selectFirstRow();
    });

  2. #2
    Ext User
    Join Date
    May 2007
    Location
    Budapest, Hungary
    Posts
    9
    Vote Rating
    0
    cocinerox is on a distinguished road

      0  

  3. #3
    Ext User
    Join Date
    Feb 2008
    Posts
    12
    Vote Rating
    0
    snow is on a distinguished road

      0  

    Default

    Many Thanks, thats worked

  4. #4
    Sencha User
    Join Date
    Jan 2011
    Posts
    2
    Vote Rating
    0
    groberts2002 is on a distinguished road

      0  

    Default My grids have paragraphs in now and it looks much more useful.

    My grids have paragraphs in now and it looks much more useful.

    Thanks.

Thread Participants: 2