开发者

WPF Drill-down GridView to display live data

I'm writing a monitoring system that displays real-time sensor data.

The sensors are arranged in a hierarchy. Sensor 1 could, for instance, have S1.1 and S1.2 as children, which could in-turn have S1.1.1, S1.2.1, and so forth.

I'm looking for a GridView control that allows one to drill-down each parent item, while still refreshing the values in the grid with the live data.

It would obviously not be that hard to write such a开发者_如何学Go component oneself, but would rather buy something than spend a week creating such a control.


Telerik has a Grid View which allows rows to be grouped together. This grouping can be recursive, which allows one to drill-down. This should be sufficient for the application I'm writing.


This is a very basic code. without connectivity.

 public function showDrill(chk:CheckBox):void{
        if(chk.selected){
            var createdDrill:Panel;
            chk.parent.height = 150;
            createdDrill = createDrill(chk);
            parent.addChild(createdDrill);
            //Alert.show(parent.);
            //createdDrill.id = 
            parent.getChildIndex(parent.getChildByName(createdDrill.name)).toString();
        }
        else{
            parent.removeChild(parent.getChildByName(chk.uid));
            chk.parent.height = DEFAULT_MEASURED_HEIGHT;
        }
      }

  public function createDrill(chk:CheckBox):Panel{
    var drill:Panel = new Panel();
    var txtArea:TextArea = new TextArea();
    var butt:Button = new Button();
    txtArea.text = "This is the so called boring textarea text";
    butt.label = "Dont Click";
    drill.name = chk.uid;
    drill.height = 100; 
    drill.alpha = 1;
    drill.x = chk.parent.x + 50;
    drill.y = chk.parent.y + 50;
    drill.width = chk.parent.parent.width - drill.x;
    drill.addChild(txtArea);
    drill.addChild(butt);
    return drill;
  }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜