GroupingStyle が NoGrouping に設定される場合、1 を返します。そうでない場合には、「Preferred...」と MinimumColumnWidth 設定を使用して、メイン グループがどのように表示されるのかを決定します。
Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Get the total number of columns being displayed, and the ' total number of groups being displayed Dim inViewColumnCount As Int32 = Me.UltraDayView1.InViewColumnCount Dim inViewGroupCount As Int32 = Me.UltraDayView1.InViewGroupCount ' Get the number of columns being displayed for each group ' by dividing the total number of columns by the number ' of groups Dim columnsPerGroup As Int32 = (inViewColumnCount / inViewGroupCount) Debug.WriteLine("The minimum number of days being displayed for each owner is " + columnsPerGroup.ToString()) End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using System.Diagnostics; private void button1_Click(object sender, System.EventArgs e) { // Get the total number of columns being displayed, and the // total number of groups being displayed int inViewColumnCount = this.ultraDayView1.InViewColumnCount; int inViewGroupCount = this.ultraDayView1.InViewGroupCount; // Get the number of columns being displayed for each group // by dividing the total number of columns by the number // of groups int columnsPerGroup = (inViewColumnCount / inViewGroupCount); Debug.WriteLine( "The minimum number of days being displayed for each owner is " + columnsPerGroup.ToString() ); }