找回密码
 立即注册

QQ登录

只需一步,快速开始

shengqian416

注册会员

1

主题

1

帖子

7

积分

注册会员

积分
7
最新发帖
shengqian416
注册会员   /  发表于:2018-2-26 08:30  /   查看:3526  /  回复:1
一个js中有两个 Grid,html中对于第二个引用 不显示,控制台报错 Cannot find the host element.
第一个:
  // initialize the grid
    var theGrid = new wijmo.grid.FlexGrid('#theGrid', {
        columns: [
                { binding: 'indexName', header: '指数名称' },
          { binding: 'totalIncomeIndex', header: '总收益指数' },
          { binding: 'totalIncomeRate', header: '总收益指数涨跌幅(%)        ' },
          { binding: 'fullPriceIndex', header: '全价指数', format: 'n0' },
                { binding: 'fullPriceIndexRate', header: '全价指数涨跌幅(%)' },
          { binding: 'netPriceIndex', header: '净价指数' },
          { binding: 'netPriceIndexRate', header: '净价指数涨跌幅(%)' },
          { binding: 'showDate', header: '日期', format: 'n0' },
          { binding: 'showTime', header: '时间', format: 'n0' },
                                ],
        autoGenerateColumns: false,
        itemsSource: view,
        selectionMode: wijmo.grid.SelectionMode.Row
    });

第二个:
var theGridColumn = new wijmo.grid.FlexGrid('#theGridColumn', {
        columns: [
                { binding: 'bondName', header: '债券简称' },
          { binding: 'bondCode', header: '债券代码' },
          { binding: 'period', header: '待偿期(年)' },
          { binding: 'fullPriceOfDay', header: '日间估价全价', format: 'n0' },
                { binding: 'fullPriceOfDayRate', header: '日间应计利息' },
          { binding: 'netPrice', header: '估价净价' },
          { binding: 'netPriceRate', header: '估价收益率' },
          { binding: 'fullPriceOfDay', header: '日终估价全价' },
          { binding: 'fullPriceOfDayRate', header: '日终应计利息' },
          { binding: 'showDate', header: '日期', format: 'n0' },
          { binding: 'showTime', header: '时间', format: 'n0' }
                                ],
        autoGenerateColumns: false,
        itemsSource: data1,
        allowResizing: 'None'
    });


html:
<div id="content" style="margin:100px 100px 100px 280px;">
                <div id="theGridColumn"></div>
</div>

1 个回复

倒序浏览
JeffryLI
葡萄城公司职员   /  发表于:2018-2-26 14:16:50
沙发
您好,从您的代码里面我测试我这边是没有问题的。可以在提供更详细的信息。
请点击评分,对我5分评价,谢谢!

葡萄城控件服务团队
官方网站: https://www.grapecity.com.cn/developer
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部