Example #1
0
 internal ColumnDataChangedEventArgs( Column column, WhatPropertyChanged whatChanged )
 {
     WhatChanged = whatChanged;
     Column = column;
 }
Example #2
0
 /// <summary>
 /// Sets the column width to fit the specified columns contents.
 /// </summary>
 /// <param name="columns">Columns to size</param>
 public void SizeColumnsToFit( Column[] columns )
 {
     ListSection.SizeColumnsToFit( columns );
 }
Example #3
0
 /// <summary>
 /// Creates a copy of the given column
 /// </summary>
 /// <param name="columnToCopy"></param>
 public Column( Column columnToCopy )
 {
     _name = columnToCopy._name;
     _comparitor = columnToCopy._comparitor;
     _caption = columnToCopy._caption;
     _width = columnToCopy._width;
     _sortOrder = columnToCopy._sortOrder;
     _groupSortOrder = columnToCopy._groupSortOrder;
     _isVisible = columnToCopy._isVisible;
     _isGrouped = columnToCopy._isGrouped;
     _columnItemValueAccessor = columnToCopy._columnItemValueAccessor;
     _groupItemValueAccessor = columnToCopy._groupItemValueAccessor;
     _groupedComparitor = columnToCopy._groupedComparitor;
     _headerIcon = columnToCopy.HeaderIcon;
     _isFixedWidth = columnToCopy.IsFixedWidth;
     _showHeaderSortArrow = columnToCopy.ShowHeaderSortArrow;
     _wrapText = columnToCopy.WrapText;
 }
Example #4
0
        private void InitGrid()
        {
            Column nameColumn = new Column("ProductPane.ProductName", ResourceHelper.Instance.GetString("ProductPane.ProductName"), 200, delegate(object item) { return ((ProductInfo)item).ProductName; });
            Column remarkColumn = new Column("ProductPane.Remark", ResourceHelper.Instance.GetString("ProductPane.Remark"), 120, delegate(object item) { return ((ProductInfo)item).Remark; });
            Column productionDateColumn = new Column("ProductPane.ProductionDate", ResourceHelper.Instance.GetString("ProductPane.ProductionDate"), 120, delegate(object item) { return ((ProductInfo)item).ProductionDate; });
            Column createDateColumn = new Column("ProductPane.CreateDate", ResourceHelper.Instance.GetString("ProductPane.CreateDate"), 120, delegate(object item) { return ((ProductInfo)item).CreateDate; });
            Column modifiedDateColumn = new Column("ProductPane.ModifiedDate", ResourceHelper.Instance.GetString("ProductPane.ModifiedDate"), 120, delegate(object item) { return ((ProductInfo)item).ModifiedDate; });
            Column categoryColumn = new Column("ProductPane.Category", ResourceHelper.Instance.GetString("ProductPane.Category"), 80, delegate(object item) { return ((ProductInfo)item).CategoryName; });
            Column subcategoryColumn = new Column("ProductPane.SubCategory", ResourceHelper.Instance.GetString("ProductPane.SubCategory"), 80, delegate(object item) { return ((ProductInfo)item).SubCategoryName; });
            Column craftsColumn = new Column("ProductPane.Crafts", ResourceHelper.Instance.GetString("ProductPane.Crafts"), 80, delegate(object item) { return ((ProductInfo)item).Crafts; });
            Column materialColumn = new Column("ProductPane.Material", ResourceHelper.Instance.GetString("ProductPane.Material"), 80, delegate(object item) { return ((ProductInfo)item).Material; });
            //Column statusColumn = new Column("ProductPane.Status", ResourceHelper.Instance.GetString("ProductPane.Status"), 80, delegate(object item) { return ((ProductInfo)item).StatusName; });
            //Column originColumn = new Column("ProductPane.Origin", ResourceHelper.Instance.GetString("ProductPane.Origin"), 80, delegate(object item) { return ((ProductInfo)item).OriginName; });
            //Column styleColumn = new Column("ProductPane.Style", ResourceHelper.Instance.GetString("ProductPane.Style"), 80, delegate(object item) { return ((ProductInfo)item).StyleName; });
            Column colorColumn = new Column("ProductPane.Color", ResourceHelper.Instance.GetString("ProductPane.Color"), 80, delegate(object item) { return ((ProductInfo)item).Color; });
            Column specColumn = new Column("ProductPane.Spec", ResourceHelper.Instance.GetString("ProductPane.Spec"), 80, delegate(object item) { return ((ProductInfo)item).Specification; });
            Column stockColumn = new Column("ProductPane.Stock", ResourceHelper.Instance.GetString("ProductPane.Stock"), 120, delegate(object item) { return ((ProductInfo)item).Stock; });

            productionDateColumn.GroupItemAccessor = new ColumnItemValueAccessor(GroupValueFromItem);
            productionDateColumn.GroupSortOrder = SortOrder.Descending;
            productionDateColumn.SortOrder = SortOrder.Ascending;

            listControl1.Columns.Add(productionDateColumn);
            productionDateColumn.MoveBehaviour = Column.MoveToGroupBehaviour.Copy;
            listControl1.Columns.Add(nameColumn);
            nameColumn.MoveBehaviour = Column.MoveToGroupBehaviour.Copy;
            listControl1.Columns.Add(categoryColumn);
            categoryColumn.MoveBehaviour = Column.MoveToGroupBehaviour.Copy;
            listControl1.Columns.Add(subcategoryColumn);
            subcategoryColumn.MoveBehaviour = Column.MoveToGroupBehaviour.Copy;
            listControl1.Columns.Add(materialColumn);
            materialColumn.MoveBehaviour = Column.MoveToGroupBehaviour.Copy;
            listControl1.Columns.Add(craftsColumn);
            craftsColumn.MoveBehaviour = Column.MoveToGroupBehaviour.Copy;
            listControl1.Columns.Add(specColumn);
            specColumn.MoveBehaviour = Column.MoveToGroupBehaviour.Copy;
            listControl1.Columns.Add(colorColumn);
            colorColumn.MoveBehaviour = Column.MoveToGroupBehaviour.Copy;
            //listControl1.Columns.Add(styleColumn);
            //styleColumn.MoveBehaviour = Column.MoveToGroupBehaviour.Copy;
            //listControl1.Columns.Add(originColumn);
            //originColumn.MoveBehaviour = Column.MoveToGroupBehaviour.Copy;
            //listControl1.Columns.Add(statusColumn);
            //statusColumn.MoveBehaviour = Column.MoveToGroupBehaviour.Copy;
            listControl1.Columns.Add(stockColumn);
            stockColumn.MoveBehaviour = Column.MoveToGroupBehaviour.Copy;
            listControl1.Columns.Add(createDateColumn);
            createDateColumn.MoveBehaviour = Column.MoveToGroupBehaviour.Copy;
            listControl1.Columns.Add(modifiedDateColumn);
            modifiedDateColumn.MoveBehaviour = Column.MoveToGroupBehaviour.Copy;
            listControl1.Columns.Add(remarkColumn);
            remarkColumn.MoveBehaviour = Column.MoveToGroupBehaviour.Copy;

            listControl1.Columns.GroupedItems.Add(productionDateColumn);
            listControl1.ShowCustomizeSection = true;
            listControl1.DoubleClick += new EventHandler(listControl1_DoubleClick);
        }