【问题标题】:Change style of a EnhancedGrid line on "onRowClick" event在“onRowClick”事件上更改增强网格线的样式
【发布时间】:2010-12-21 09:13:07
【问题描述】:

我想更改网格线的颜色但没有选择它。这意味着我不能使用 onStyleRow 事件,因为它仅对“选定”、“奇数”或“过度”事件作出反应。

有什么想法吗?

谢谢

【问题讨论】:

    标签: dojox.grid


    【解决方案1】:

    我找到了一个 updateRowStyles(idxRow) 函数,但不知道如何使用它(如何传递样式等)并且不确定它是否能解决我的问题

    【讨论】:

      【解决方案2】:

      你不能这样改变你的风格:

      var layout = [
      { field: 'denumire', name: 'Denumire', width: '200px', height: '25px', styles: "color:red;" },
      { field: 'valoare', name: 'Valoare', width: '252px', styles: "color:red;"}];
      

      或在布局网格中使用格式化程序

      var layout = [
      { field: 'denumire', name: 'Denumire', width: '200px', height: '25px',  formatter:  function (value, rowIndex) {
             return "<div style='height:110px;text-overflow:ellipsis;color:red;'>"+value+"</div>"
      } },
      { field: 'valoare', name: 'Valoare', width: '252px',
      formatter: function (value, rowIndex) {
             return "<div style='height:110px;text-overflow:ellipsis;color:red;'>"+value+"</div>"
      }}];
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2013-01-27
        • 2012-03-02
        • 2013-04-04
        • 2016-04-13
        • 1970-01-01
        • 2018-01-01
        • 1970-01-01
        相关资源
        最近更新 更多