Example #1
0
        void SetTagsGrid()
        {
            GridViewDef view = new GridViewDef(GridViewDef.DefaultViewName);
            ObservableList <GridColView> viewCols = new ObservableList <GridColView>();

            view.GridColsView = viewCols;

            viewCols.Add(new GridColView()
            {
                Field = GherkinTag.Fields.Name, WidthWeight = 200, BindingMode = System.Windows.Data.BindingMode.OneWay
            });
            viewCols.Add(new GridColView()
            {
                Field = GherkinTag.Fields.Line, WidthWeight = 30, BindingMode = System.Windows.Data.BindingMode.OneWay
            });
            viewCols.Add(new GridColView()
            {
                Field = GherkinTag.Fields.Column, WidthWeight = 30, BindingMode = System.Windows.Data.BindingMode.OneWay
            });

            TagsGrid.SetAllColumnsDefaultView(view);
            TagsGrid.InitViewItems();

            TagsGrid.RowChangedEvent += TagsGrid_RowChangedEvent;
        }
        private void SetTagsGridView()
        {
            GridViewDef defView = new GridViewDef(GridViewDef.DefaultViewName);

            defView.GridColsView = new ObservableList <GridColView>();

            defView.GridColsView.Add(new GridColView()
            {
                Field = RepositoryItemTag.Fields.Name, Header = "Name", WidthWeight = 40
            });
            defView.GridColsView.Add(new GridColView()
            {
                Field = RepositoryItemTag.Fields.Description, Header = "Description", WidthWeight = 40
            });

            TagsGrid.SetAllColumnsDefaultView(defView);
            TagsGrid.InitViewItems();

            TagsGrid.btnAdd.AddHandler(Button.ClickEvent, new RoutedEventHandler(AddButton));
        }
Example #3
0
        private void SetGridView()
        {
            GridViewDef view = new GridViewDef(GridViewDef.DefaultViewName);

            view.GridColsView = new ObservableList <GridColView>();

            view.GridColsView.Add(new GridColView()
            {
                Field = "Selected", WidthWeight = 20, StyleType = GridColView.eGridColStyleType.CheckBox
            });
            view.GridColsView.Add(new GridColView()
            {
                Field = "Name", Header = "Name", WidthWeight = 50, ReadOnly = true, BindingMode = BindingMode.OneWay
            });
            view.GridColsView.Add(new GridColView()
            {
                Field = "Description", Header = "Description", WidthWeight = 30, ReadOnly = true, BindingMode = BindingMode.OneWay
            });

            TagsGrid.SetAllColumnsDefaultView(view);
            TagsGrid.InitViewItems();
        }