Пример #1
0
        public List <DocumentsDisplayColumnInfo> GetDisplayColumnList(string localResourceFile)
        {
            var objColumnSettings = new List <DocumentsDisplayColumnInfo> ();

            if (!string.IsNullOrWhiteSpace(DisplayColumns))
            {
                // read "saved" column sort orders in first
                foreach (var strColumn in DisplayColumns.Split(new [] { ',' }, StringSplitOptions.RemoveEmptyEntries))
                {
                    var strColumnData = strColumn.Split(new [] { ';' }, StringSplitOptions.RemoveEmptyEntries);
                    var strColumnName = strColumnData [0];

                    if (DocumentsDisplayColumnInfo.AvailableDisplayColumns.Contains(strColumnName))
                    {
                        var objColumnInfo = new DocumentsDisplayColumnInfo {
                            ColumnName          = strColumnName,
                            DisplayOrder        = objColumnSettings.Count + 1,
                            Visible             = bool.Parse(strColumnData [1]),
                            LocalizedColumnName = Localization.GetString(strColumnName + ".Header", localResourceFile)
                        };

                        objColumnSettings.Add(objColumnInfo);
                    }
                }
            }

            return(objColumnSettings);
        }
Пример #2
0
 protected override void InitLayout()
 {
     string[] tokens = this.colWidthsString.Split(';');
     this.colWidths        = Array.ConvertAll <string, float>(tokens, float.Parse);
     this.arrColumnsName   = DisplayColumns.Split(';');
     this.arrFormatColumns = formatColumns.Split(';');
     this.RowWidth         = this.colWidths.Sum();
     base.InitLayout();
 }