小编Avi*_*tor的帖子

如果其他条件,剑道ui网格

我的代码出了什么问题?

我必须检查kendo UI网格我的列中是否有"OrderType 20".如果是,我需要应用我的css条件,其中包括背景,但它不起作用,有人可以帮助我吗?谢谢

template: '# if (OrderType == "OrderType 20") {#<div class='customClass'>#:OrderType#</div>#} else {#OrderType#}#'
Run Code Online (Sandbox Code Playgroud)

javascript conditional if-statement kendo-grid

8
推荐指数
3
解决办法
4万
查看次数

Kendo网格列号格式化

如果绑定2个数据值,如何在kendo列中设置数字格式?在我的例子中,我必须将值与单位绑定,所以我需要一个用2位小数写的值.我的代码看起来像:

{
    field: "Quantity",
    title: "Value ",
    width: "70px",
    type: "number",
    format:"{0:n2}",
    template: "#:Quantity# #:Unit#",
    attributes:{style:"text-align:right;"}
},
Run Code Online (Sandbox Code Playgroud)

没有它绑定到单位它很好,但有单位我有一个问题.提前致谢

templates number-formatting kendo-ui kendo-grid

6
推荐指数
1
解决办法
2万
查看次数

如何在kendo下拉列表中搜索文本?

我的下拉列表工作正常,但我希望有一些像编辑字段,用户可以搜索值.有人能帮助我吗?它位于kendo网格的列中.这是我的下拉列表的代码.干杯!

{
    field: "Material",
    title: txt.TXT_MATERIAL,
    width: "15%",
    filterable: {
      ui: function (element) {
          kendoOdsMaterials.setFilterUi(element, undefined);
      }
    },
    editor: function (container, options) {
      if (PCommonPortalMethods.GetSiteLanguage() == "en") {
          $('<input kendo-drop-down-list  k-data-text-field="\'MaterialGlobalName\'" k-data-value-field="\'_Key\'" data-bind="value:' + options.field + '" k-data-source="dataSourceKendoOdsMaterials(undefined)" />').appendTo(container);
      } else {
          $('<input kendo-drop-down-list  k-data-text-field="\'MaterialLocalName\'" k-data-value-field="\'_Key\'" data-bind="value:' + options.field + '" k-data-source="dataSourceKendoOdsMaterials(undefined)" />').appendTo(container);
      }

    },
    template: "#if (PCommonPortalMethods.GetSiteLanguage() == 'en') {# #=Material.MaterialGlobalName# # } else { # #=Material.MaterialLocalName#  # } #"

},
Run Code Online (Sandbox Code Playgroud)

javascript jquery kendo-ui angularjs kendo-grid

1
推荐指数
1
解决办法
8714
查看次数

在剑道网格列模板中嵌套 if 条件

尝试在剑道网格列模板中实现条件函数时,出现问题,未显示网格中的数据,我的函数是

function material() {
  if (PCommonPortalMethods.GetSiteLanguage() == 'en') {
    if (data.Unit._Key) {
      Unit.UnitGlobalName
    }
    else ('')
  }
  else {
    if (data.Unit._Key) {
      Unit.UnitLocalName
    }
    else ('')
  }
}      
Run Code Online (Sandbox Code Playgroud)

我从模板中调用它,例如: template:'#= material() #'

我也尝试过类似的事情:

template: "#if (PCommonPortalMethods.GetSiteLanguage() == 'en') {# if(data.Unit._Key) #=Unit.UnitGlobalName#  else(" ") #} else { # if(data.Unit._Key) #=Unit.UnitLocalName#  else(" ") #} #"
Run Code Online (Sandbox Code Playgroud)

有人能帮我吗?我究竟做错了什么?谢谢

javascript if-statement kendo-ui kendo-grid

1
推荐指数
1
解决办法
6130
查看次数