---
title: "combogrid--1"
author: "youyang_java"
date: "2014-06-17T11:18:56Z"
tags: []
categories: ["Web前端"]
slug: "combogrid-1"
draft: false
lastmod: "2014-06-17T11:18:55Z"
id: 2080482
url: "https://youyang-java.iteye.com/blog/2080482"
---

![](http://dl2.iteye.com/upload/attachment/0098/1410/2de1683c-8974-3e3c-bfe2-c67aa2b89076.png)  
 &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;  
&lt;html&gt;  
 &lt;head&gt;

  &lt;meta http-equiv="keywords" content="keyword1,keyword2,keyword3"&gt;  
  &lt;meta http-equiv="description" content="this is my page"&gt;  
  &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"&gt;

  &lt;!-- easyui的样式 --&gt;  
  &lt;link rel="stylesheet" type="text/css"  
   href="../jslib/jquery-easyui-1.3.1/themes/default/easyui.css"&gt;  
  &lt;!-- 小图标的样式 --&gt;  
  &lt;link rel="stylesheet" type="text/css"  
   href="../jslib/jquery-easyui-1.3.1/themes/icon.css"&gt;

  &lt;script type="text/javascript"  
   src="../jslib/jquery-easyui-1.3.1/jquery-1.8.0.min.js"&gt;&lt;/script&gt;  
  &lt;script type="text/javascript"  
   src="../jslib/jquery-easyui-1.3.1/jquery.easyui.min.js"&gt;&lt;/script&gt;  
  &lt;script type="text/javascript"  
   src="../jslib/jquery-easyui-1.3.1/locale/easyui-lang-zh\_CN.js"&gt;&lt;/script&gt;  
     
  &lt;script type="text/javascript" src="../jslib/syUtil.js"&gt;&lt;/script&gt;

  &lt;script type="text/javascript"&gt;  
     
   $(function() {  
    $('#cc').combogrid({    
     mode : 'remote',  
     delay : 500,  
     panelWidth : 450,  
     panelHeight : 150,  
        url : sy.bp()+'/userController/datagrid.action',  
     iconCls : "icon-save",  
     pagination : true,  
     pageSize : 10,  
     pageList : \[10,20,30],  
     //fit属性让这个表格填充到父级容器中  
     fit : true,  
     //fitColumns让表格自动调整列的宽度，而不出现横向的滚动条  
     fitColumns : true,  
     //如果一个列的值太长，需要折行显示，就需要设置nowrap : false  
     nowrap : false,  
     border : false,  
     idField : "id",  
     //选择后，显示的字段  
     textField : "name",  
     sortName : "name",  
     sortOrder : "desc",  
     columns : [[  
      {title:"编号", field:"id", width:100},  
      {title:"姓名", field:"name", width:100, sortable:true},  
      {title:"密码", field:"password", width:200},  
      {title:"创建时间", field:"createdatetime", width:200}  
     ]]  
     /\**  
     toolbar : [  
      {text:"新增",iconCls:"icon-add",handler:function(){}},  
      "-",  
      {text:"删除",iconCls:"icon-remove",handler:function(){}},  
      "-",  
      {text:"修改",iconCls:"icon-edit",handler:function(){}}  
     ]\*\*/  
    });  
      
   });  
    
  &lt;/script&gt;  
 &lt;/head&gt;  
 &lt;body style="width:100%;height:100%;"&gt;  
  &lt;input id="cc" style="width:200px"&gt;  
 &lt;/body&gt;  
&lt;/html&gt;