Beispiel #1
0
        /// <summary>
        /// Instantiates a Grid
        /// </summary>
        /// <param name="columnLayout">Defines the grid column layout, default column layout is invisible</param>
        public Grid(Dictionary <string, ColumnLayoutConfig> columnLayout)
        {
            _defaultLayoutSetting = new ColumnLayoutConfig()
            {
                Alias = "", Visible = false, Width = 5
            };

            Init(columnLayout);
        }
Beispiel #2
0
        private Dictionary <string, ColumnLayoutConfig> CreateLayoutSettings(IEnumerable <PropertyInfo> properties, Dictionary <string, int> maxColumnLength)
        {
            var layoutSettings = new Dictionary <string, ColumnLayoutConfig>();

            foreach (var property in properties)
            {
                var config = new ColumnLayoutConfig()
                {
                    Alias   = property.Name,
                    Width   = maxColumnLength[property.Name],
                    Visible = true
                };

                layoutSettings.Add(config.Alias, config);
            }

            return(layoutSettings);
        }
Beispiel #3
0
        /// <summary>
        /// Instantiates a Grid with default layout settings of GridView
        /// </summary>
        public Grid()
        {
            _defaultLayoutSetting = null;

            Init(null);
        }