当前位置: 代码迷 >> ASP.NET >> asp.net+extjs3.2.0解决思路
  详细解决方案

asp.net+extjs3.2.0解决思路

热度:1479   发布时间:2013-02-25 00:00:00.0
asp.net+extjs3.2.0
运行的结果是第一个节点打开关不上,最后两个节点打不开,只有第二三个节点是好的
Extjs代码:
Ext.onReady(function(){
  Ext.BLANK_IMAGE_URL="Extjs3.2.0/resources/images/default/s.gif";
  var Tree = Ext.tree;
  var tree = new Tree.TreePanel({
  el:'west_content',//渲染到
  useArrows:true,
  autoHeight:true,
  split:true,
  lines:true,
  autoScroll:true,
  animate:true,
  enableDD:true,
  border:false,
  containerScroll: true, 
  loader: new Tree.TreeLoader({
  dataUrl:'GetTrees.ashx'
  })
  });
  var root = new Tree.AsyncTreeNode({
  text: '机型零部件菜单',
  draggable:true,
  id:'0' 
  });
  tree.setRootNode(root);
  tree.render();
  root.expand();
   
  var viewport = new Ext.Viewport({
  layout:'border',
  items:[{
  region:'west',
  id:'west',
  title:'菜单导航',
  split:true,
  width: 200,
  minSize: 200,
  maxSize: 400,
  collapsible: true,
  margins:'60 0 2 2',
  cmargins:'60 5 2 2',
  layout:'fit',
  layoutConfig:{ activeontop:true},
  defaults: { bodyStyle: 'margin:0;padding:0;'},
  items:
  new Ext.TabPanel({
  border:false,
  activeTab:0,
  tabPosition:'bottom',
  items:[{
  contentEl:'west_content',
  title:'系统管理',
  autoScroll:true,
  bodyStyle:'padding:5px;'
  }]
  })
  },{
  region:'center',
  el:'center',
  deferredRender:false,
  margins:'60 0 2 0',
  html:'<iframe id="center-iframe" width="100%" height=100% name="main" frameborder="0" scrolling="auto" style="border:0px none; background-color:#BBBBBB; " ></iframe>',
  autoScroll:true 
  },
  {
  region:'south',
  margins:'0 0 0 2',
  border:false,
  html:'<div class="menu south">Copyright © 2010 Kimi Yang All Rights Reserved</div>'
  }
  ]
  });
   
  setTimeout(function(){
  Ext.get('loading').remove();
  Ext.get('loading-mask').fadeOut({remove:true});
  }, 250)
  });

GetTrees.ashx:
 namespace test4.web
{
  /// <summary>
  /// $codebehindclassname$ 的摘要说明
  /// </summary>
  [WebService(Namespace = "http://tempuri.org/")]
  [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
  public class GetTrees : IHttpHandler
  {

  public void ProcessRequest(HttpContext context)
  相关解决方案