2
UltraGrid와 UltraGrid에서 확장 된 UltraGridColumn의 너비를 정확하게 얻으려면 어떻게해야합니까?ultragridcolumn의 실제 너비를 얻는 방법
나는 다음과 같은 Windows 양식이 있습니다
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
IEnumerable<string> test = new List<string>{DateTime.Now.ToString()};
this.ultraGrid2.DataSource = test;
this.ultraGrid2.DisplayLayout.AutoFitStyle = AutoFitStyle.ExtendLastColumn;
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("The column width is " + this.ultraGrid2.DisplayLayout.Bands[0].Columns[0].Width);
}
}
을에 관계없이 내가 조작하거나 양식의 크기를 조정하는 방법. width
은 여전히 동일한 기본값을 제공합니다. 열의 크기를 조정해야만 변경됩니다. 이 경우 너비가 양식 자체의 x 크기에 가깝다고 생각합니다.
이 설명 주셔서 감사 열의 CellSizeResolved 속성을 얻을 수 있습니다 해결 방법. –