我在 dojox.grid.DataGrid 中显示来自 htmlStore 表的数据。我希望在某些数据单元格中包含 html 内容(锚点 - a href)。我尝试对 htmlStore 表中的锚点进行硬编码,但显然这非常低效。
我被指示使用 htmlStore。我的偏好是使用 ItemFileWriteStore 然后我可以硬编码关联的 json 文件中的 url。
布局代码如下。提前致谢!
dojo.require("dojox.data.HtmlStore");
dojo.require("dojox.grid.DataGrid");
// set the layout structure:
var layoutDash = [
[{
field: 'Order ID',
name: 'Order ID',
width: '56px'
},
{
field: 'Opportunity ID',
name: 'Opportunity ID',
width: '110px'
},
{
field: 'Opportunity Name',
name: 'Opportunity Name',
width: '170px'
},
{
field: 'Customer',
name: 'Customer',
width: '210px'
},
{
field: 'Sales Rep',
name: 'Sales Rep',
width: '80px'
},
{
field: 'Stage/Status',
name: 'Stage/Status',
width: '100px'
},
{
field: 'Last Modified',
name: 'Last Modified',
width: '90px'
},
{
field: 'Actions',
name: 'Actions',
width: 'auto',
editable: 'true'
}]];