EasyUI的datagrid有值但是显示不出来

$("#goodsList").datagrid({
  url: "../Ajax/GoodsAjax.ashx",
  queryParams:
  {
  cmd:  'getAllGd',

  strWhere: strWhere,
  id:i
  },
  fitColumns: true, 
  pagination: true,  
  rownumbers: true, 
  singleSelect: false, 
  striped: true,  
  checkOnSelect: true,
// onDblClickRow: clickRowGd, 
  pageSize: 50, 
  pageList: [10, 50, 100, 1000, 5000], 
  columns: [[
  {
   field: "row",
   checkbox: true,
  },
  {
   field: "g_Code",
   title: "编码",
   align: "center",
   width: "90"
 },
 {
   field: "g_Name",
   title: "名称",
   align: "center",
   width: "250"
 },
 {
   field: "g_SellPrice ",
   title: "零售价",
   align: "center",
   width: "100"
 },
 {
   field: "g_Memo",
   title: "备注",
   align: "center",
   width: "250"
 }
 ]],
});

问题:前面几个columns中‘编码’、‘名称’都正常显示,‘零售价’不显示,可是调试出的‘零售价’有值,也就是从后台获取到数据了,但为什么不显示?

解决:困扰了好久,原来是这 field出了问题,看这里: field: "g_SellPrice ",    g_SellPrice后面多了一个空格

转载于:https://www.cnblogs.com/weimingxin/p/6814605.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值