【发布时间】:2009-12-17 18:26:07
【问题描述】:
我正在尝试让数据网格中的 dojo 按钮使用样式。目前它不使用样式。
HTML:
<table dojoType="dojox.grid.DataGrid" class="soria" id="grid1" jsId="grid1" elasticView="2" store="theStore" selectionMode="single" query="{grid1:'*'}">
<thead>
<TR>
<th field="0" formatter="getButton">Show value</th>
</tr>
</thead>
javascript:
function getButton(item){
return "<button class=/"soria/" dojoType=\"dijit.form.Button\" onClick=\"\">Button</button>";
}
【问题讨论】:
-
我认为您将不得不提供更多详细信息。什么不工作?按钮,样式?样式有什么问题?
-
该按钮确实加载了,如果我手动解析创建的小部件,它确实采用了 soria 主题。但是,如果对网格进行任何操作,主题就会丢失。
-
嗯,主题不取决于您在网格上设置的主题或页面的正文元素吗? (我以前从未尝试过混合和匹配)
-
整个页面的主题是soria。我不是想混合它们,我只是希望按钮在动态加载到网格时具有 soria 主题。我已经对其进行了更多研究,我认为升级到 1.4 将解决这个问题。我会看到......希望它不会破坏其他一切。