easyui datagrid 不显示数据问题

图片说明

jsp代码:

 <%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户信息</title>
</head>
<%@include file="/public/head.jspf"%>
<body>
    <script type="text/javascript">
        function search() {
            var date = $('#dd1').datebox('getValue');
            var phone = $('#phone').val();
            $('#dg').datagrid('load', {
                'date' : date,
                'phone' : phone
            });
        }

        $(function() {
            var myDate = new Date();
            var dateStr = myDate.getFullYear() + "-" + (myDate.getMonth() + 1)
                    + "-" + myDate.getDate();
            $('#dd1').datebox('setValue', dateStr);
            $('#dg').datagrid({
                fit : true,
                fitColumns : true,
                pagination : true,
                url : '/userInfo/userList',
                queryParams : {
                    'date' : dateStr
                },
                striped : true,
                columns : [ [ {
                    field : 'id',
                    title : 'id',
                    width : 100,
                    align : 'center'
                }, {
                    field : 'phone',
                    title : '手机号',
                    width : 100,
                    align : 'center'
                } ] ]
            });
        });

        /*
        function search() {
            var start = $('#dd1').datebox('getValue');
            alert(start);
            alert();
            if(start == "") {
                alert("日期输入错误");
                return;
            }
            $.post("/userInfo/userStat", {
                start : start,
                end : end,
            }, function(result) {
                if (result.status === 1) {
                    document.getElementById("count").innerHTML = result.data.count; 
                    document.getElementById("report1").innerHTML = result.data.report1; 
                    document.getElementById("report2").innerHTML = result.data.report2; 
                } else {
                    alert(result.msg);
                }
            },"json");
        };
         */
    </script>
    <div>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注册时间<input id="dd1" type="text"
            class="easyui-datebox" required="required"></input>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;手机号<input id="phone"
            class="input-medium search-query" type="text" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <button onclick="search()">筛选</button>

        <table id="dg"></table>


    </div>
</body>
</html>

格式返回应该没错, 页面也没有报错,就是不显示数据,求解

3个回答

<table id="dg"></table>
    <div id="tool">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注册时间<input id="dd1" type="text"
        class="easyui-datebox" required="required"></input>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;手机号<input id="phone"
        class="input-medium search-query" type="text" />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <button onclick="search()">筛选</button>


</div>

你就不能插入代码片么?你代码都被浏览器解析了,很乱

把table和toolbar分开写,然后在datagrid里面加toolbar: "#tool",

     注册时间      手机号       筛选

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Easyui datagrid不显示数据
刚接触easyui,不太熟,根据datagrid的格式拼装了数据,无法显示到datagrid里,但是在jsp里面创建一个var变量就可以显示,求大牛帮忙看下nnJSP页面代码:n```n $(function() n //alert(getParasFromUrl("selectType"));n //alert(getParasFromUrl("objectID"));n //初始化表格内容n $('#dataList').datagrid(n title : 'IP地址详情',n //data:dataGrid,n method : 'post',n singleSelect : true,n height : 370,n fit : true,n fitColumns : true,n striped : true,n collapsible : true,n //url : "/jsp/jcss/IPQueryDetailAction.do?operation=queryIPFromDB",n url : "/InfoMgr/jsp/jcss/IPQueryDetailAction.do?operation=query&selectType="+getParasFromUrl("selectType") + "&objectID=" + getParasFromUrl("objectID"),n sortName : 'IP',n pageSize: 50, //每页显示的记录条数,默认为10n pageList: [30, 50, 100, 200, 300], //分页显示选项n sortOrder : 'asc',n remoteSort : false,n idField : 'ID',n pagination : true, // 显示分页n rownumbers : true, // 显示行号n columns : [ [n field : 'ID', title : '序号', width : 20, sortable : true, halign : 'center',n field : 'IP', title : 'IP', width : 100, sortable : true, halign : 'center',n field : 'HOSTNAME', title : '主机名称', width : 100, sortable : true, halign : 'center',n field : 'GATEWAY', title : '网关', width : 80, sortable : true, halign : 'center',n field : 'USEFOR', title : '用途', width : 120, sortable : true, halign : 'center',n field : 'PROPOSER', title : '申请人', width : 120, sortable : true, halign : 'center',n field : 'CREATEDATE', title : '申请时间', width : 120, sortable : true, halign : 'center',n ] ],n onLoadSuccess : function() n //alert('OK');n //$('#dataList').datagrid('reload');n //$('#dataList').datagrid('clearSelections'); // 一定要加上这一句,要不然datagrid会记住之前的选择状态,删除时会出问题n ,n onDblClickRow: function (rowIndex, rowData) nn ,n onClickRow: function (rowIndex, rowData) nn ,n n );n);n```n后台数据拼装:nnn```n public List getIPSegFromDB(String ID)n System.out.println("call getIPSegFromDB");n List lstIPs = new ArrayList();n n StringBuffer sb = new StringBuffer();n sb.append("\"total\":28,\"rows\":[");n sb.append("\"ID\":\"1\",\"IP\":\"192.168.1.1\",\"HOSTNAME\":\"test\",\"GATEWAY\":\"192.168.1.254\",\"USEFOR\":\"测试\",\"PROPOSER\":\"11\",\"CREATEDATE\":\"2015-11-21\",");n sb.append("\"ID\":\"2\",\"IP\":\"192.168.1.2\",\"HOSTNAME\":\"test\",\"GATEWAY\":\"192.168.1.254\",\"USEFOR\":\"测试\",\"PROPOSER\":\"111\",\"CREATEDATE\":\"2015-11-21\"");n sb.append("]");n n lstIPs.add(sb.toString());n return lstIPs;n n```nn返回json:nnn```n response.getWriter().print(JSONArray.fromObject(qis.getIPSegFromDB(objectID)).toString()); n```nn鼓捣一晚上了没查出问题来,但是按照下面的格式写到jsp页面里,就能显示出来。。。。求解啊。。。nnn```n var dataGrid = "total":28,"rows":[n "ID":"1","IP":"192.168.1.1","HOSTNAME":"test","GATEWAY":"192.168.1.254","USEFOR":"测试","PROPOSER":"111","CREATEDATE":"2015-11-21","ID":"2","IP":"192.168.1.2","HOSTNAME":"test","GATEWAY":"192.168.1.254","USEFOR":"测试","PROPOSER":"111","CREATEDATE":"2015-11-21",n "ID":"1","IP":"192.168.1.1","HOSTNAME":"test","GATEWAY":"192.168.1.254","USEFOR":"测试","PROPOSER":"111","CREATEDATE":"2015-11-21","ID":"2","IP":"192.168.1.2","HOSTNAME":"test","GATEWAY":"192.168.1.254","USEFOR":"测试","PROPOSER":"111","CREATEDATE":"2015-11-21"n ];n```nnnnnnnn
easyui datagrid 不显示第一页数据
问个很白的问题。。别笑话我。。。rn打算页面打开后,就直接显示数据,rn但是现在必须点一下分页栏上的刷新才显示。倒也显示页数和记录数,请教这是怎么回事啊? rnrn```rn rn```rnrn
bootstrap弹出框不显示EasyUI dataGrid数据
修改 弹出框为bootstrap弹出框 bootstrap弹出框不显示EasyUI dataGrid数据: 解决办法,在 dataGrid加载前加上 代码: $('#myModal').on("shown.bs.modal",function(){ $('#listDataTable').datagrid('resize'); }); ...
easyui中datagrid 不显示数据
之前并没有系统使用easyui组件的机会。本次也是在基于该前端框架下完成一个简单的查询功能并展示的问题。 datagrid即数据网格,用于展示列表数据,以行为单位且支持分页。 问题背景:根据查询参数查询符合条件的数据。前端使用easyUI,后端使用spring mvc。 然而根据条件查询只会返回一条数据,因此也没有考虑分页什么的。 现象:后台以JSON格式返回,键值与前端的field的名称...
jquery easyui datagrid 不显示
我再table中加入class="easyui-datagrid",结果内容就不显示了,是什么原因造成的。特殊说明,我用的不是jsp,是.ftl文件,引用几行代码:[code=html] rn rn rn rn rnrn rnrn[/code]rn在调试工具中显示的是rn[code=html]rnrn rn rn rn rnrn[/code]
easyui datagrid 不显示json数据
过程描述:页面 A输入参数,进入controller进行逻辑处理并生成json数据,然后通过rn MVC返回json数据,并对页面A相关easyui datagrid表格进行数据展示。rn 问题:easyui datagrid不现实数据,且页面不报错,调试能看到json数据。rn 页面代码: rn rn rnrn```rn 测试rn function test()rn rn jq('#tt').datagrid(rn title:'DataGrid - DetailView',rn width:500,rn height:250,rn remoteSort:false,rn singleSelect:true,rn nowrap:false,rn fitColumns:true,rn type:"POST",rn url:'/store/saleout/getjson',rn columns:[[rn field:'product_name',title:'Item ID',width:80,rn field:'numbers',title:'Product ID',width:100,sortable:true,rn field:'price',title:'List Price',width:80,align:'right',sortable:true,rn field:'buyer',title:'Unit Cost',width:80,align:'right',sortable:truern ]]rn rn );rn alert("333");rn rn```rnrnrn 调试显示数据:"rows":["product_name":"土豆","numbers":2,"price":40,"buyer":"A","style":"A","type":"WU","saleoutdate":"2015-3-31"],"total":1rn rn 请教一下:什么原因导致 easyui datagrid数据不显示?不报错,不知道到底从哪里入手,困扰了不短时间,多谢!!rn rn 页面完整代码如下,调试数据截图在附件中。rn ![![图片说明](https://img-ask.csdn.net/upload/201505/31/1433004879_544586.png)图片说明](https://img-ask.csdn.net/upload/201505/31/1433004871_778225.png)rnrnrn```rn rn rn<%@ page language="java" contentType="text/html; charset=utf-8"rn pageEncoding="utf-8"%>rn<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>rn<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>rn<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>rn<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>rn<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>rnrnrnrnrnrn rn saleoutrn rnrn rnrnrnrnrnrnrn rn rn rn rn rn rn 测试rn rn rnrnrn rn rn rn rn 产品名称: rn rn rn rn rn rn 提交rn rn rnrnrnrnrn```rn
easyui datagrid 数据的显示和查询
引用css、js 初始化DataGrid $(document).ready(function() { $("#table").datagrid({ 'url':'${pageContext.request.contextPath}/Data.do',//异步请求数据的url 'fitCo
EasyUI datagrid不显示table信息问题
 一个页面同时有两个datagrid时,其中一个datagrid被调用后不显示table及其信息。如果你不是因为没有设置table宽高、不是因为写错单词或因copy忘了改两个datagrid的id造成的失误,那就检查哈你的table是不是写成这样了:如果是这样那就赶紧改吧:改完后刷新页面table及其信息就这样就神奇般出来了。...
easyui datagrid数据显示不出来
在我正确的按照例子从后台取数后,前台无法显示(都不报错,数据正常),发现去除几个字段可以显示,加上就无法显示,很无奈,后来才发现,返回的数据中出现了空格 还有\r \n 类似于\ 这种符号,可能由于easyui datagrid 不识别这类数据,然后就展示空白,希望小伙伴们注意了
DataGrid 不显示数据问题。
[code=VB]rnPrivate Sub Form_Load()rn rn Dim CN As New ADODB.Connectionrn Dim strCN As Stringrn rn strCN = "Driver=SQL Server;server=(local);database=Northwind;uid=sa;pwd="rn rn CN.CursorLocation = adUseClientrn CN.Open strCNrnrn Dim strSQL As Stringrn rn strSQL = "Select 档案序号,姓名 From page"rnrn Dim Rs As New ADODB.Recordsetrn rn Rs.Open strSQL, CN, adOpenKeyset, adLockOptimisticrnrn Set DataGrid1.DataSource = Rsrn DataGrid1.Refreshrnrn Rs.Closern Set Rs = Nothingrn CN.Closern Set CN = Nothingrn rnEnd Subrn[/code]rnrn运行后,DataGrid 像是没做过任何改动一样,只显示两行空白行。。。rn查了N多帖子,没有一点头绪。。。。有请高人相助
DataGrid不显示数据问题
DataGrid绑定好了数据,可是从数据库里找完了付给DataGrid,DataGrid不显示??还是我写错了?rnrn Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loadrn '在此处放置初始化页的用户代码rn If Not IsPostBack Thenrn If Session("U_name") = "" Thenrn Response.Write("<" + "script language=javascript>alert(""您尚未登陆![错误代码:001000]"");")rn Response.Write("window.self.location.href=""login.aspx"";")rn Response.End()rn Elsern dealtree()rn End Ifrn End Ifrn End Subrn Sub dealtree()rn Dim type = Request.QueryString("type")rn Dim priority = Request.QueryString("priority")rn rn If priority = "" Thenrn get_tree(0, type)rn Elsern get_tree(priority, type)rn End Ifrn End Subrnrn Sub get_tree(ByVal priority As String, ByVal type As String)rn mycon = New SqlClient.SqlConnection(ConfigurationSettings.AppSettings("sql_path"))rn Dim mycmd As SqlClient.SqlDataAdapterrnrn If priority = "0" Thenrn mycmd = New SqlClient.SqlDataAdapter("select a.notice_id,title,content,file_names,add_date from notice_base as a,notice_file as b where a.notice_id=b.notice_id and type= '" & type & "' order by add_date desc", mycon)rn Elsern mycmd = New SqlClient.SqlDataAdapter("select a.notice_id,title,content,file_names,add_date from notice_base as a,notice_file as b where a.notice_id=b.notice_id and type= '" & type & "' and priority= '" & priority & "' order by add_date desc", mycon)rn End Ifrn Dim dt As DataSet = New DataSetrn mycmd.Fill(dt, "notice_base")rn DataGrid1.DataSource = dt.Tables("notice_base").DefaultViewrn DataGrid1.DataBind()rn mycon.Close()rn End Subrn
datagrid不显示数据问题!
我在窗口的初始化里放了邦定datagrid的程序,并用afxmessagebox检查是否能读到数据,但结果是afxmessagebox读到了,datagrid却没有显示,请问我下面这段程序哪里有问题?rnrnBOOL CDatagridDialog::OnInitDialog() rnrn CDialog::OnInitDialog();rn rn //使用ADO连接数据库...rn //---------------------------------------------------------------------------------rn _ConnectionPtr m_pConnection; rnrn CoInitialize(NULL);rn m_pConnection.CreateInstance(__uuidof(Connection));rn m_pConnection->PutCursorLocation(adUseClient); rnrn try rn rn // 打开本地Access库rn m_pConnection->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Demo.mdb","","",adModeUnknown);rn AfxMessageBox("连接数据库成功!");rn rn catch(_com_error *e)rn rn AfxMessageBox(e->ErrorMessage());rn rn //-----------------------------------------------------------------------------------rn //建立数据集rn //-----------------------------------------------------------------------------------rn rn _RecordsetPtr m_pRecordset;rn m_pRecordset.CreateInstance(__uuidof(Recordset));rnrn _variant_t RecordsAffected;rn rn tryrn rnrn m_pRecordset->Open("SELECT * FROM users", // 查询DemoTable表中所有字段rnrn m_pConnection.GetInterfacePtr(), // 获取库接库的IDispatch指针rnrn adOpenDynamic,rnrn adLockOptimistic,rnrn adCmdText);rnrn rnrn catch(_com_error *e)rnrn rnrn AfxMessageBox(e->ErrorMessage());rnrn rnrn UpdateData(true);rnrn m_Mydatagrid.SetRefDataSource(NULL);rn m_Mydatagrid.SetRefDataSource((LPUNKNOWN)m_pRecordset);rn m_Mydatagrid.Refresh();rnrn//检查是否能读到数据库的数据 rn _variant_t var;rn CString strName;rn var=m_pRecordset->Fields->GetItem("username")->Value;rn if(var.vt != VT_NULL)rn strName = (LPCSTR)_bstr_t(var); rn AfxMessageBox(strName);rnrn UpdateData(false);rnrn if(m_pConnection->State)rn m_pConnection->Close();rn //关闭记录集rn
easyui datagrid显示选择行数据问题
今天使用easyui datagrid发现无论怎么选择行,getSelections得到的数据都不为选择的所有数据。 发现是由于设置了idField属性,所以如果idField没有载入,它会认为是同一条数据,所以发生上面情况。 idField属性删除后就行了。 ...
ASP.NET MVC EasyUI DataGrid显示数据问题
我在用了PageSize :15rnfunction Test() rnrn $('#dg').datagrid(rn title: 'Checkbox selection on DataGrid',rn url: '/Home/GetData',rn method: 'GET', //默认是post,不允许对静态文件访问rn width: '700',rn //iconCls: 'icon-save',rn dataType: 'JSON',rn fitColumns: true,rn rownumbers: true, //是否加行号 rn pagination: true, //是否显式分页 rn pageSize: 15, //页容量,必须和pageList对应起来,否则会报错 rn pageNumber: 1, //默认显示第几页 rn pageList: [15, 30, 45],//分页中下拉选项的数值 rn columns: [[rn field: 'UserName', title: '名称' ,rn field: 'UserPass', title: '密码' rn ]],rn singleSelect: false, //允许选择多行rn selectOnCheck: true,//true勾选会选择行,false勾选不选择行, 1.3以后有此选项rn checkOnSelect: true //true选择行勾选,false选择行不勾选, 1.3以后有此选项rn );rn rn后台rn[HttpGet]rn public JsonResult GetData()rn rn List t1 = new List();rn for (int i = 0; i < 40; i++)rn rn Test test = new Test();rn test.UserName = "Test1";rn test.UserPass = "Test1";rn t1.Add(test);rn rn return Json(t1, JsonRequestBehavior.AllowGet);rn rnrn public class Testrn rn public string UserName get; set; rn public string UserPass get; set; rn rn还是把40条数据都显示出来了 不知道为什么,请教!!!!!!!!!!!!!!请教!!!!!!!!!!!!
easyui datagrid用 insertRow 添加一行数据 数据不显示
rn```rn rn rn rn rn rn rn 用户列表rn rn rn 保单列表rn rn rn 添加用户rn rn rn 添加表单rn rn rn 用户管理rn rn rn 表单管理rn rn rn rn rn rn rn rnrnrn $('#userManage').on("click",function()rn if(flog3==0)rn flog3+=1;rn $('#tt').tabs('add',rn title:'用户管理', rn content:' 用户名: ', rn closable:true, rn tools:[ rn iconCls:'icon-mini-refresh', rn handler:function() rn alert('refresh'); rn rn ] rn );rn $('#dg3').datagrid(width:'100%',height:'100px', rn columns:[[ rn field:'id',title:'ID',width:100, rn field:'loginId',title:'用户名',width:100, rn field:'name',title:'姓名',width:100,rn field:'a',title:'操作',width:100,formatter:function(value,row,index)rn return '修改/删除';rn ,align:'right'rn ]] rn );rn elsern $('#dg3').datagrid("reload");rn rn rn );rn rn function chaxun()rn var loginId = $("#text1").val();rn //把loginId传到后台rn $.ajax(rn url:"$basePath/dba/checkLoginId",rn type:"post",rn data:"loginId":loginId,rn dataTypt:"json",rn success:function(result)rn if(result==0)rn $("#m3").css("color":"#00ff00").text("用户名不存在");rn elsern console.log(result);rn $('#dg3').datagrid("insertRow",rn index:0,rn row:rn id:result.id,rn loginId:result.loginId,rn name:result.namern rn );rn rn rn );rnrn```rn数据能获取,但添加的行里没有数据rn![图片说明](https://img-ask.csdn.net/upload/201805/13/1526223042_426471.jpg)rn点“用户管理”的时候会生成一个选项卡,这个选项卡输入用户名再点查询按钮如果用户名存在可以添加一行数据在datagrid里,现在用户信息可以查到,但是现在数据无法写入到datagrid中
datagrid不显示数据
绑定了行不显示值,代码如下:rnasp:BoundColumn DataField="CLASSID" HeaderText="料件分类Id" SortExpression="PART_CLASSID">rn rn rn rn rn rn另外加了个删除列。rndatagrid1.datasource=dataset1.rndataset1里面有值,为什么不显示啊。
DataGrid不显示数据??
代码如下:rnPrivate Sub Form_Load()rn Dim Rs_User_Code As ADODB.Recordsetrn Dim strSqlSelect As Stringrn Dim i As Integerrn rn strSqlSelect = "Select Code As '用户名' From User_Code"rn '打开数据库连接 开始rn mOpenDBrn '打开数据库连接 结束rn rn Set Rs_User_Code = New ADODB.Recordsetrn Rs_User_Code.CursorLocation = adUseClientrn Rs_User_Code.Open strSqlSelect, mPlc_Connection, 3, 1rn If Not Rs_User_Code.EOF Or Not Rs_User_Code.BOF Thenrn '记录集不为空rn Set DGrid_UserPower.DataSource = Rs_User_Codern 'MsgBox (DGrid_UserPower.Columns(0))rn 'DGrid_UserPower.Refreshrn rn Elsern '记录集为空rn End Ifrn Rs_User_Code.Closern Set Rs_User_Code = Nothingrn '关闭数据库联系 开始rn mCloseDBrn '关闭数据库联系 结束rnEnd SubrnrnMsgBox (DGrid_UserPower.Columns(0))还有数据,就是不显示rnrn要显示的是一个字段中的内容rnrn另在表中现在只有两条记录rnrn也有 Rs_User_Code.CursorLocation = adUseClientrnrn请高手们帮忙!!谢谢!
easyUI tree不显示数据
如题,在后台把数据转换为树形结构,打印出来都是对的,但是就是无法显示在tree上,rn这是树形json数据:rn"id":135064,"text":"sinux","depid":0,"children":["id":235100,"text":"行政部","depid":135064,"children":["id":235101,"text":"人事部","depid":235100,"children":[],"id":235102,"text":"财务管理","depid":235100,"children":["id":235103,"text":"审计部","depid":235102,"children":[],"id":235114,"text":"财务部","depid":235102,"children":[]]],"id":235104,"text":"市场部","depid":135064,"children":["id":235105,"text":"采购部","depid":235104,"children":[],"id":235106,"text":"营销部","depid":235104,"children":[],"id":235113,"text":"客户服务部","depid":235104,"children":[]],"id":235107,"text":"项目部","depid":135064,"children":["id":235108,"text":"研发部","depid":235107,"children":["id":235109,"text":"开发部","depid":235108,"children":["id":235115,"text":"软件一部","depid":235109,"children":[],"id":235116,"text":"软件二部","depid":235109,"children":[],"id":235117,"text":"软件三部","depid":235109,"children":[],"id":235118,"text":"软件四部","depid":235109,"children":[]],"id":235110,"text":"测试部","depid":235108,"children":[],"id":235112,"text":"设计部","depid":235108,"children":[]],"id":235111,"text":"运维部","depid":235107,"children":[]]]rnrn这是jsp代码rn rn rn rn rnrn来个大佬,让我学习下
easyui combo 不显示数据
rnrn$('#commodityTypeCombox').combobox(rn url:contextPath + '/sample/findTypeList.pvt',rn valueField:'id',rn textField:'name'rn );rnrn通过url数据已经加载到前台,但是不显示数据,加载到前台数据格式为:rnrn"commodityTypeList":["id":"1","name":"厨房用品","id":"2","name":"电子产品","id":"3","name":"其他"]rnrn后台代码为rn@Action(value = "findTypeList", results = @Result(type = "json", params = "includeProperties",rn " commodityTypeList\\[\\d+\\]\\.id, commodityTypeList\\[\\d+\\]\\.name" ) )rn public String findTypeList() rn this.commodityTypeList = commodityBiz.findTypeList();rn return SUCCESS;rn rnrn为什么数据已经到达前台但是不显示呢?
关于Easyui combobox 数据不显示问题
还是先上图看效果:这是正确的效果,小编不显示的原因是json数据的问题,下面是API要求的返回json格式:[{ &quot;id&quot;:1, &quot;text&quot;:&quot;text1&quot; },{ &quot;id&quot;:2, &quot;text&quot;:&quot;text2&quot; },{ &quot;id&quot;:3, &quot;text&quot;:&quot;text
easyUi treegrid 数据不显示的问题
[img=https://img-bbs.csdn.net/upload/201805/21/1526889847_379188.png][/img][img=https://img-bbs.csdn.net/upload/201805/21/1526889860_584653.png][/img][img=https://img-bbs.csdn.net/upload/201805/21/1526889870_480200.png][/img]rnrn为什么数据显示不出来 json格式和前端应该写的都没错rn
easyui datagrid combobox的显示问题
rn rn rn 编号rn 客户rn 概要rn 服务类型rn 创建人rn 创建日期rn 分配给rn 操作rn rn rn rnrnrn服务类型是combobox,每条记录怎么根据code值显示内容啊。rn
easyui datagrid 底部分页栏不显示
如图rn[img=https://img-bbs.csdn.net/upload/201610/14/1476413730_387485.jpg][/img]rn现在分页栏显示不出来,怎么办?rn贴上我的页面代码[code=javascript]rn var time = $("#time").val();rn $('#tt').datagrid( rn title: "省市单位数据", rn url: '<%=request.getContextPath()%>/Sgszbzs/getGriddataBySql?kpiid='+id+'&time='+time, rn pageSize:30,rn //high:100%,rn rowStyler: function(index,row)rn return 'font-size:10px;';rn ,rn pageList : [30,40,50],//可以选择的分页集合rn nowrap : true,//设置为true,当数据长度超出列宽时将会自动截取rn striped : true,//设置为true将交替显示行背景。rn collapsible : true,//显示可折叠按钮rn fitColumns:true,//允许表格自动缩放,以适应父容器rn pagination : true,//分页rn rownumbers : true,//行数rn columns: [ rn [ rn field: 'dwbm', title: '单位编码', width: 100, align: "center", rn field: 'dwmc', title: '单位名称', width: 130, align: "center", rn field: 'dwjb', title: '单位级别', width: 100, align: "center",rn field: 'zbjg', title: '指标结果', width: 100, align: "center",rn field: 'sfyj', title: '是否预警', width: 100, align: "center",rn field: 'sfss', title: '是否申诉', width: 100, align: "center",rn field: 'gbgs', title: '指标公式', width: 280, align: "center",rn ] rn ] rn ); rn[/code]rnrn对应页面代码rn[code=html]rn rn rn[/code]
easyui datagrid右边框不显示的解决方法
 将datagrid 的函数放在$(function(){})内,datagrid右边框就可以正常显示了
easyui的datagrid获得数据的问题
jsp页面使用了几个easyui的数据列表,但这个列表只能显示出表头,表的内容获取不到,程序没有报错,而且请求也没到达Controller,请大神指导一下,谢谢nn n n n 参数名称n 参数代码n n n
easyUI使用datagrid分页栏不显示
今天在使用easyUI的时候,发现一个很奇怪的问题,就是我的中部布局的div中在加了一个table后,里面表格的分页栏就不能显示出来了,不多说了,直接上代码吧 datagrid表格加载函数 $('#back_llzpj_datagrid').datagrid({   url : '/Examination2.0/assessmentpaper_findAllPointPaper.ac
jquery easyUi插件DataGrid数据不显示 求思路
[img=http://hi.csdn.net/attachment/201111/11/5389202_1321004356ZJvR.jpg][/img]rnrn问题在图片里面大家看看吧。rn图片可能没有显示完全 直接复制:http://hi.csdn.net/attachment/201111/11/5389202_1321004356ZJvR.jpg 打开rn谢谢了
jQuery EasyUI的datagrid数据不能在页面显示
使用ThinkPHP框架,在index.html中显示一个grid,但是数据显示不上去,只能显示表头。不知道怎么回事,路径都没什么问题的。rnindex.html页面的javascript代码如下。rn rnrnbody部分就是一个table, rnjson代码如下:rn"total":28,"rows":[rn "productid":"FI-SW-01","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1",rn "productid":"K9-DL-01","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10",rn "productid":"RP-SN-01","unitcost":12.00,"status":"P","listprice":28.50,"attr1":"Venomless","itemid":"EST-11",rn "productid":"RP-SN-01","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12",rn "productid":"RP-LI-02","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13",rn "productid":"FL-DSH-01","unitcost":12.00,"status":"P","listprice":158.50,"attr1":"Tailless","itemid":"EST-14",rn "productid":"FL-DSH-01","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15",rn "productid":"FL-DLH-02","unitcost":12.00,"status":"P","listprice":63.50,"attr1":"Adult Female","itemid":"EST-16",rn "productid":"FL-DLH-02","unitcost":12.00,"status":"P","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17",rn "productid":"AV-CB-01","unitcost":92.00,"status":"P","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"rn]rnrn详细代码见附件:rn[url=http://bbs.thinkphp.cn/forum.php?mod=viewthread&tid=48763][/url]
刚学easyui,使用datagrid数据不显示,页面空白
不报错,页面时完全空白的。。rn[code=HTML]rn<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>rnrnrnrn rn rn rn rn rn rn rn rn rn rnrnrn[/code]rn这是我的json数据,手写死的rn[code=XML]rn rn "total":10, rn "rows":[ rn "id":"001","user":"ok","title":"这款软件我非常满意","sendTime":"2012年1月1日 15:40",rn "id":"002","user":"zs","title":"I think so good","sendTime":"2012年1月1日 15:40",rn "id":"003","user":"zs","title":"这款软件我非常满意","sendTime":"2012年1月1日 15:40",rn "id":"004","user":"zs","title":"I think so good","sendTime":"2012年1月1日 15:40",rn "id":"005","user":"zs","title":"这款软件我非常满意","sendTime":"2012年1月1日 15:40",rn "id":"006","user":"zs","title":"I think so good","sendTime":"2012年1月1日 15:40",rn "id":"007","user":"zs","title":"这款软件我非常满意","sendTime":"2012年1月1日 15:40",rn "id":"008","user":"zs","title":"I think so good","sendTime":"2012年1月1日 15:40",rn "id":"009","user":"zs","title":"这款软件我非常满意","sendTime":"2012年1月1日 15:40",rn "id":"010","user":"zs","title":"I think so good","sendTime":"2012年1月1日 15:40"rn ] rn rnrn[/code]
ssh easyui datagrid不显示数据,初学者不知道怎么解决
[size=18px]本人在学习easyui,使用datagrid时没有拿到后台数据rn[/size][color=#FF6600][/color]rnrn下面是action文件 SortPageAction.javarnrnpackage com.hysd.action;rnrnimport java.util.ArrayList;rnimport java.util.Date;rnimport java.util.List;rnrnimport javax.annotation.Resource;rnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnrnimport org.apache.struts2.ServletActionContext;rnimport org.json.simple.JSONObject;rnrnimport com.hysd.service.PlanService;rnimport com.hysd.service.RecordService;rnimport com.hysd.service.UserService;rnimport com.opensymphony.xwork2.ActionSupport;rnrnpublic class SortPageAction extends ActionSupport rnrn /**rn * rn */rn private static final long serialVersionUID = 1L;rnrn @Resourcern private PlanService planService; // 通过Spring 注解 planService CTRL+鼠标点击rnrn private Integer planId;rnrn private Date planStartDate;rn private Date planEndDate;rn private Date planSubmitDate;rn private String planTitle;rn private String planContent;rn private Integer planState;rnrn private String rows;// 每页显示的记录数rn private String page;// 当前第几页rnrn private List list = new ArrayList();rn private JSONObject jsonObj = new JSONObject();rnrn // 查询出所有学生信息rnrn public String getAllPlan() throws Exception rnrn String hql = "FROM Plan";rnrn list = planService.getList(page, rows);rn toBeJson(list, planService.count(hql).intValue());rnrn System.out.println("page----" + page);rn System.out.println("rows----" + rows);rnrn return SUCCESS;rn rnrn // 转化为Json格式rnrn public void toBeJson(List list, int total) throws Exception rn HttpServletResponse response = ServletActionContext.getResponse();rn HttpServletRequest request = ServletActionContext.getRequest();rnrn jsonObj.put("total", total);// total代表一共有多少数据rn jsonObj.put("list", list);// row是代表显示的页的数据rnrn response.setCharacterEncoding("utf-8");// 指定为utf-8rn response.getWriter().write(jsonObj.toString());// 转化为JSOn格式rnrn System.out.println("jobj.toString()----" + jsonObj.toString());rnrn rnrn public Integer getPlanId() rn return planId;rn rnrn public void setPlanId(Integer planId) rn this.planId = planId;rn rnrn public String getRows() rn return rows;rn rnrn public void setRows(String rows) rn this.rows = rows;rn rnrn public String getPage() rn return page;rn rnrn public void setPage(String page) rn this.page = page;rn rnrn public Date getPlanStartDate() rn return planStartDate;rn rnrn public void setPlanStartDate(Date planStartDate) rn this.planStartDate = planStartDate;rn rnrn public Date getPlanEndDate() rn return planEndDate;rn rnrn public void setPlanEndDate(Date planEndDate) rn this.planEndDate = planEndDate;rn rnrn public Date getPlanSubmitDate() rn return planSubmitDate;rn rnrn public void setPlanSubmitDate(Date planSubmitDate) rn this.planSubmitDate = planSubmitDate;rn rnrn public String getPlanTitle() rn return planTitle;rn rnrn public void setPlanTitle(String planTitle) rn this.planTitle = planTitle;rn rnrn public String getPlanContent() rn return planContent;rn rnrn public void setPlanContent(String planContent) rn this.planContent = planContent;rn rnrn public Integer getPlanState() rn return planState;rn rnrn public void setPlanState(Integer planState) rn this.planState = planState;rn rnrnrnrn这个是jsp: success.jsprn<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>rn<%rnString path = request.getContextPath();rnString basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";rn%>rnrn<%@ taglib prefix="s" uri="/struts-tags" %>rnrnrnrn rn rn rn rn planlistrn rn rn rn rn rn rn rnrnrnrn rn easyui的DataGrid实例rn rn rn rn rn rn 计划标题rn 计划状态rn rn rn rn rn rnrnrnrnstruts.xml配置文件rnrnrnrnrn rn rn rn rn rnrn rn rn rnrnrnrn运行页面显示:rn[img=https://img-bbs.csdn.net/upload/201505/31/1433073547_951275.png][/img]rnrn情况就是后台没有数据显示,但是我的hql语句查到了,麻烦好心的朋友告诉我怎么解决,或者你们有什么源码示例给我rn发一份,rnrnrn
easyui 的 datagrid 在选项卡 tabs 中不显示数据
nn```n nn n n n 添加选项卡n n n n n n n n nn n n
easyui之datagrid为什么后台返回的数据在前台不显示
前台的datagrid如下:rnrn rn rnrn rn rn rn rn rn后台模拟的返回json格式的数据如下:rnpublic class datagrid01 extends HttpServlet rn public void service(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOExceptionrn response.setCharacterEncoding("UTF-8");rn rn [b]String json="['id':'001','name':'admin','password':'password']";[/b]rn PrintWriter out = response.getWriter();rn out.print(json.toString());rn rnrnrn响应中的数据:rn['id':'001','name':'admin','password':'password']rn问题:为什么前台显示不出来'id':'001','name':'admin','password':'password'呢?rn
easyui datagrid 显示时间转换
DateFormat df = new SimpleDateFormat(&quot;yyyy-MM-dd&quot;);//格式化时间   log_qxj.setTime1(df.format(log_qxj.getTime()));
easyUI下datagrid嵌套显示
主要是运用 easyui的方法进行行内嵌套显示,让一行可以显示更多的东西,让一行显示JSON的字符串、从表之类的东西。 下边先看效果图: 接下来说实现过程: (1)在首次加载中添加代码 view: detailview, detailFormatter:function(index,row){ return '&lt;div style="padding:2px"...
JQuery EasyUI 1.3.6 DataGrid显示不了数据
rnJQuery EasyUI 1.3.6 DataGrid显示不了数据,只能显示一个表头,我使用的是JQuery EasyUI 1.3.6的Demo.rn我的系统是windows7 64bit旗舰版.rnrn以前用过这个UI框架,还挺简的。rnrn这个问题我想应该是我的系统问题。但怎么弄都搞不定。要是哪位知道问题所在请一定帮忙。
easyui的datagrid的数据渲染
easyui的datagrid的数据渲染
easyui dataGrid显示对象中集合数据
[img=https://img-bbs.csdn.net/upload/201408/17/1408261747_412871.png][/img],如何将截图中set集合在easyui dataGrid中显示出来???
EasyUI datagrid 没有查询到数据显示提示
EasyUI datagrid 没有查询到数据显示提示,无数据在datagrid显示一行提示 在datagrid在onLoadSuccess方法中加入一下代码: [code=&quot;js&quot;] onLoadSuccess: function(data){ //如果没有数据 if(data.rows.length==0){ var columnLength = Grid....
easyui datagrid数据批量删除
js页面//批量删除 function deleteStampdef(ctx) { var selRow = $("#dg").datagrid('getSelections'); if (selRow.length == 0) { showError("请至少选择一行数据!"); return false;
easyui datagrid 列数据太多显示不完
当某一列的数据太多,在单元格中无法全部显示时,可以采用如下方式: { field : 'cust_telphone', title : '联系电话', width : '10%', }, { field : 'cust_product', title : '关注产品', width : '20%', formatter: function...
相关热词 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法