如题,
同样的代码不加locked属性是响应的;var data =[[1,"000811121267","Jacky",185.37,207.79],
[1,"000811121268","Tommy",185.37,207.79],
[1,"000811121269","Lucy",185.37,207.79]];
var store = new Ext.data.SimpleStore({data:data, fields:["id","no","name", "day01", "day02"]});
var myGrid = Ext.create('Ext.grid.Panel',{
renderTo:"hello",
title:"click with locked",
width: 300,
height: 150,
columns:[
{header:"number", dataIndex:"no"},
{header:"name", dataIndex:"name"},
{header:"day1", dataIndex:"day01", width:70},
{header:"day2", dataIndex:"day02", width:70}],
store:store,
listeners:{
'itemdblclick' : function(){alert(7);} //works!
}
});加了locked, 比如{header:"number", dataIndex:"no", locked:true}就不再响应了,
这是为神马呢?
同样的代码不加locked属性是响应的;var data =[[1,"000811121267","Jacky",185.37,207.79],
[1,"000811121268","Tommy",185.37,207.79],
[1,"000811121269","Lucy",185.37,207.79]];
var store = new Ext.data.SimpleStore({data:data, fields:["id","no","name", "day01", "day02"]});
var myGrid = Ext.create('Ext.grid.Panel',{
renderTo:"hello",
title:"click with locked",
width: 300,
height: 150,
columns:[
{header:"number", dataIndex:"no"},
{header:"name", dataIndex:"name"},
{header:"day1", dataIndex:"day01", width:70},
{header:"day2", dataIndex:"day02", width:70}],
store:store,
listeners:{
'itemdblclick' : function(){alert(7);} //works!
}
});加了locked, 比如{header:"number", dataIndex:"no", locked:true}就不再响应了,
这是为神马呢?
从表现来看, 就是当内容超过表格宽度,在拖动的时候,
locked了的列不随着其它列滑动, 见图: