لقد غيرت المشكلات الأخيرة النافذة عند استخدام الشبكة ، ولكن لا يمكن تكييف الشبكة مع التغيير ، لذلك أضفت خطًا من البيان.
تم حل المشكلة ، خريطة التأثير
التأثير بعد السحب
الجمل المضافة:
نسخ رمز رمز على النحو التالي:
Ext.EventManager.OnwindowResize (function () {
Grid1.getView ().
})
انظر الرمز الكامل ؛
نسخ رمز رمز على النحو التالي:
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "content-type" content = "text/html ؛ charset = gb2312">
<title> الشبكة </title>
<Link Href = "../ Ext/Resources/CSS/Ext-all.css.
<script src = "../ ext/adapter/ext/ext-base.js" type = "text/javaScript"> </script> </script>
<script src = "../ ext/ext.js" type = "text/javaScript"> </script>
<script type = "text/javaScript">
Ext.OnReady (function () {
وظيفة RenderAdmin ()
{{
إرجاع "<span style = 'cursor: pointer ؛' onClck = 'Alert () ؛'> <img src = '../ images/eLaM.JPG'/> </span>" ؛
}
var sm = new ext.grid.CheckBoxSelectionModel () ؛
// var sm1 = new ext.grid.rowselectionModel ({singleselect: true}) ،
var cm = new ext.grid.columnmodel ([[[[[[[[[[[[[[[[[
جديد ext.grid.roonumber () ،
SM ،
// SM1 ،
{header: '<span style = "cursor: pointer ؛"> <img src = "../ images/icons/elem.jpg"/> </a> </span>' ، dataindex: 'admin' : 30 ، Renderr: Rendradmin ، قابلة للفرز: خطأ} ،
{header: 'id' ، dataindex: 'id'} ،
{id: 'name' ، header: 'name' ، dataindex: 'name'} ،
{header: 'إرسال شخص' ، dataindex: 'من'} ،
{header: 'المستلم' ، dataindex: 'to'}
]) ؛
بيانات var = [
['' ، '001' ، 'حصاد واحد' ، 'Zhang San' ، 'li si'] ،
['' '،' 002 '،' استقبل اثنين '،' Zhang Four '،' Lee Five '] ،
['' ، '003' ، 'استلام الطلب الثالث' ، 'Zhang Liu' ، 'Li Qi Seven']
] ؛
var store = new ext.data.store ({{{
الوكيل: New Ext.data.Memoryproxy (البيانات) ، البيانات ،
القارئ: جديد ext.data.arayreader ({} ، [
{name: 'admin'} ،
{name: 'id'} ،
{name: 'name'} ،
{الاسم: 'من'} ،
{name: 'to'}
])
}) ؛
store.load () ؛
var grid1 = new ext.grid.gridpanel ({{{
Renderto: 'Grid1' ،
الاسم: 'Grid1' ،
التصميم: "مناسب" ،
العنوان: "استلام قائمة" ،
AutoHeight: صحيح ،
autowidth: صحيح ،
BodyStyle: "العرض: 100 ٪" ،
loadmask: صحيح ،
// AutoExpandColumn: "الاسم" ،
autowidth: صحيح ،
// tbar: [{text: 'send' ،
// icon: '../images/icons/application_edit.jpg' ،
// CLS: 'x-btn-text-icon'} ،
// {text: 'Delete' ،
// icon: '../images/icons/application_edit.jpg' ،
// CLS: 'x-btn-text-icon'}] ،
المتجر: متجر ،
الإطار: صحيح ،
سم: سم ،
SM: SM ،
ViewConfig: {
ForceFit: True} ،
المستمعون: {
ROWDBLCK: Function (n) {
// احصل على بنك الاختيار الحالي ، اتجاه الإدخال
// debugger ؛
var iid = Grid.getSelectionModel ().
window.location.href = "subframe.html؟ id ="+iid ؛
}
}
}) ؛
Ext.EventManager.OnwindowResize (function () {
Grid1.getView ().
})
}) ؛
</script>
</head>
<body>
<div id = "grid1">
</div>
</body>
</html>