private void SetGridView()
        {
            GridViewDef view = new GridViewDef(GridViewDef.DefaultViewName);
            ObservableList <GridColView> viewCols = new ObservableList <GridColView>();

            view.GridColsView = viewCols;

            viewCols.Add(new GridColView()
            {
                Field = nameof(FlowControl.Active), WidthWeight = 50, StyleType = GridColView.eGridColStyleType.CheckBox
            });
            viewCols.Add(new GridColView()
            {
                Field = nameof(FlowControl.Operator), Header = "Condition", WidthWeight = 150, BindingMode = BindingMode.TwoWay, StyleType = GridColView.eGridColStyleType.ComboBox, CellValuesList = OperatorList
            });
            view.GridColsView.Add(new GridColView()
            {
                Field = nameof(FlowControl.Condition), Header = "Custom Condition", WidthWeight = 200, StyleType = GridColView.eGridColStyleType.Template, CellTemplate = ucGrid.getDataColValueExpressionTemplate(nameof(FlowControl.ConditionVE), (Context)mAct.Context)
            });
            viewCols.Add(new GridColView()
            {
                Field = nameof(FlowControl.ConditionCalculated), Header = "Condition Calculated", WidthWeight = 150, BindingMode = BindingMode.OneWay
            });
            view.GridColsView.Add(new GridColView()
            {
                Field = nameof(FlowControl.FlowControlAction), Header = "Action", WidthWeight = 200, StyleType = GridColView.eGridColStyleType.Template, CellTemplate = GetDataColActionFlowControlTemplate(nameof(FlowControl.ActionForEdit))
            });
            viewCols.Add(new GridColView()
            {
                Field = nameof(FlowControl.Status), WidthWeight = 150
            });
            FlowControlGrid.SetAllColumnsDefaultView(view);
            FlowControlGrid.InitViewItems();
        }
Beispiel #2
0
        private void SetGridView()
        {
            GridViewDef view = new GridViewDef(GridViewDef.DefaultViewName);
            ObservableList <GridColView> viewCols = new ObservableList <GridColView>();

            view.GridColsView = viewCols;

            viewCols.Add(new GridColView()
            {
                Field = FlowControl.Fields.Active, WidthWeight = 50, StyleType = GridColView.eGridColStyleType.CheckBox
            });
            view.GridColsView.Add(new GridColView()
            {
                Field = FlowControl.Fields.Condition, Header = "Condition", WidthWeight = 200, StyleType = GridColView.eGridColStyleType.Template, CellTemplate = ucGrid.getDataColValueExpressionTemplate("ConditionVE")
            });
            viewCols.Add(new GridColView()
            {
                Field = FlowControl.Fields.ConditionCalculated, Header = "Condition Calculated", WidthWeight = 150, BindingMode = BindingMode.OneWay
            });
            view.GridColsView.Add(new GridColView()
            {
                Field = FlowControl.Fields.FlowControlAction, Header = "Action", WidthWeight = 200, StyleType = GridColView.eGridColStyleType.Template, CellTemplate = GetDataColActionFlowControlTemplate("ActionForEdit")
            });
            viewCols.Add(new GridColView()
            {
                Field = FlowControl.Fields.Status, WidthWeight = 150
            });
            FlowControlGrid.SetAllColumnsDefaultView(view);
            FlowControlGrid.InitViewItems();
        }