我有一个未在IE8中显示的网格面板,但在ff和opera中一切正常。这是我的代码:
<div id="mydiv"></div>
<style type="text/css">
.x-grid3-cell-inner, .x-grid3-hd-inner {white-space: inherit;}
</style>
<script type="text/javascript">
var sData=[["7039","","","dummy value","Application Administrator","Application Administrator","89/9/14?? 14:37:02 (GMT+03:30)","dummy value"],["8198","","","dummy value s","Application Administrator","","","dummy value"],["8247","","","dummy value","Application Administrator","","","dummy value"],["8261","","","dummy value","Application Administrator","","","dummy value"]];
Ext.onReady(function(){
Ext.QuickTips.init();
var store = new Ext.data.Store({
data: sData,
reader: new Ext.data.ArrayReader({
envelope_id: 'envelope_id'
}, ['envelope_id', 'status_id', 'workflow_name', 'name','created_by_full_name','modified_by_full_name', {
name: 'modified_datetime',
}, 'step_name'])
});
function linkFactory(val,x,store){
return '<a href="/workflow/envelope/EnvelopeProperties.jsp?id='+store.data.envelope_id+'">'+val+'</a>';
}
function del(val){
return '<a href="javascript:abortEnvelope(\''+val+'\', \'personal\')"><img src="../images/icons/toolbar-gen-cancel_on.gif" /></a>';}
var grid = new Ext.grid.GridPanel({
renderTo: Ext.get('mydiv'),
frame: true,
width: 520,
stripeRows: true,
enableColumnMove: false,
store: store,
columns: [
{header: "dummy value", width: 235,renderer:linkFactory, dataIndex: 'name',sortable:true,css: 'white-space:normal;'},
{header: "dummy value",width:85 ,dataIndex: 'step_name',sortable:true},
{header: "dummy value",width:120,dataIndex: 'modified_datetime',sortable:true,css: 'white-space:normal;'},
{header: "dummy value ", dataIndex: 'workflow_name',sortable:true,hidden:true,css: 'white-space:normal;'},
{header: "dummy value ", dataIndex: 'created_by_full_name',sortable:true,hidden:true,css: 'white-space:normal;'},
{header: "dummy value", dataIndex: 'modified_by_full_name',sortable:true,hidden:true,css: 'white-space:normal;'},
{renderer:del,width:25,dataIndex: 'envelope_id',hideable:false}
]
});
});
</script>
</form>
我们正在使用extjs 2.0。我不知道哪个部分会造成麻烦。有什么想法吗?!
答案 0 :(得分:2)
我们使用的是extjs的修改版本。使用原始版本后,问题解决了。 ;)
答案 1 :(得分:0)
您没有设置身高。使用:
renderTo: 'mydiv',
height: 500
&#39; mydiv&#39;存在于您的页面中?