Exemplo n.º 1
0
        public void SetRowHeight(int row, int height)
        {
            for (int i = 0; i < row; i++)
            {
                var rowMetadata = _gridData.RowMetadata.ElementAtOrDefault(i);

                if (rowMetadata == null)
                {
                    _gridData.RowMetadata.Add(new DimensionProperties());
                }
            }

            var modifiedRow = _gridData.RowMetadata.ElementAtOrDefault(row);

            if (modifiedRow == null)
            {
                var dimensionProperties = new DimensionProperties()
                {
                    PixelSize = height
                };
                _gridData.RowMetadata.Add(dimensionProperties);
            }
            else
            {
                modifiedRow.PixelSize = height;
            }
        }
Exemplo n.º 2
0
        public void SetColumnWidth(int column, int width)
        {
            for (int i = 0; i < column; i++)
            {
                var columnMetadata = _gridData.ColumnMetadata.ElementAtOrDefault(i);

                if (columnMetadata == null)
                {
                    _gridData.ColumnMetadata.Add(new DimensionProperties());
                }
            }

            var modifiedColumn = _gridData.ColumnMetadata.ElementAtOrDefault(column);

            if (modifiedColumn == null)
            {
                var dimensionProperties = new DimensionProperties()
                {
                    PixelSize = width
                };
                _gridData.ColumnMetadata.Add(dimensionProperties);
            }
            else
            {
                modifiedColumn.PixelSize = width;
            }
        }
Exemplo n.º 3
0
        public static DimensionProperties MapToColumnMetadata(Column columnDTO)
        {
            var columnDimension = new DimensionProperties();

            columnDimension.DataSourceColumnReference.Name = columnDTO.Name;
            return(columnDimension);
        }