.Net/Component

FarPoint Column Width 조절

동구밖과수원 2012. 8. 16. 18:22
        /// <summary>
        /// 모든 컬럼 Header 글자에 맞게 컬럼 Size를 조정한다.
        /// </summary>
        public void SetAutoAllColumnHeaderSize()
        {
            try
            {
                foreach (SheetView sv in this.Sheets)
                {
                    foreach (Column column in sv.Columns)
                    {
                        column.Width = column.GetPreferredWidth() + 5;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }