我基于与选定的检查(标志)conditin如何显示网格 [英] I how to display grid based on conditin with checked selected (tick mark )

查看:161
本文介绍了我基于与选定的检查(标志)conditin如何显示网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在HTML页面中我正在显示的下拉,在下拉项下是动态的,下拉显示与复选框NG-网格数据下面这些也是动态的,动态下拉拥有第j儿子数据为

In html page i am displaying the drop down ,the item in the drop down are dynamic ,and below the drop down displaying the ng-grid data with check boxes these are also dynamic ,the dynamic drop down has the j son data as

[
  {
    "c": "D",
    "l": 1,
    "cId": 1
  },
  {
    "c": "J",
    "l": 2,
    "cId": 3
  },
  {
    "c": "G",
    "l": 3,
    "cId": 1
  }
]

在下拉我也只显示属性C值。
动态网格有动态J儿子数据

In drop down i have displayed only property "c" value . The dynamic grid had dynamic j son data as

 [
  {
    "c": "U t",
    "cC": "Ut",
    "cId": 1
  },
  {
    "c": "Ca",
    "cC": "CA",
    "cId": 2
  },
  {
    "c": "U i",
    "cC": "MN",
    "cId": 3
  }
{
    "c": "U i",
    "cC": "MN",
    "cId": 4
  }
{
    "c": "U p",
    "cC": "Mz",
    "cId": 5
  }
{
    "c": "U r",
    "cC": "Mc",
    "cId": 6
  }
{
    "c": "U h",
    "cC": "Mj",
    "cId": 7
  }




]

在网格我显示vlaue的唯一属性C:
如果我选择C:在下降J下来那么如果CID:3 与CID匹配的

In grid i am showing only property of vlaue "c": If i select "c": "J" in drop down then if the "cId": 3 matched with cid of

"c": "U i",
"cC": "MN",
 "cId": 3 

它们的数据网格,然后显示与复选框电网厚厚的选择标记选择,并且如果在下拉菜单中未选定项目向下 CID是配以网格然后显示与光选标记复选框并网发电。

whose data in grid then display that grid with check box selected with thick select mark ,and also if the unselected items in the drop down cId's are match with grid then display the grid with check box selected with light select mark .

提交按钮后网格下方,然后显示属性值的唯一厚所选项目C:

After submit the button below the grid then display the only thick selected items of property value "c":

这是如何做到这一点和/或code plunkers将大大AP preciate任何想法。谢谢!

any thoughts on how to do this and/or a code plunkers would be greatly appreciate. Thanks!

推荐答案

所以你需要gridOptions ...

so you need to specify primaryKey field in gridOptions...

$scope.myData = [{name: "Moroni", age: 50, id: 101},
                 {name: "Tiancum", age: 43, id: 102},
                 {name: "Jacob", age: 27, id: 103},
                 {name: "Nephi", age: 29, id: 104},
                 {name: "Enos", age: 34, id: 105}];
$scope.gridOptions ={
    data: 'myData',
    primaryKey: 'id'
}

这篇关于我基于与选定的检查(标志)conditin如何显示网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆